The setup in CPS 3.4 uses GenericSetup. It's based on profiles, where you have a base profile and some extension profiles that can be added on top of it.

CPSDefault defines a base profile for the essential configuration.

Other additional products can define extension profiles. When you add new CPS site, or reconfigure one, you have the option to use these extensions.

For example, I've converted CPSChat to use an extension profile. As you'll see in the code, the configuration is very simple:
- a few lines in __init__.py registering the profile,
- the profile itself, by convention placed in profiles/default in the product.

In the profile, only the things to *add* on top of the base profile need to be specified. You have to include files only if they define something new, for instance new types, or new properties in some objects. And you dont' need to write them by hand, you can get the content of these files by extracting what you need from an export of an appropriately configured site from the ZMI. (CPSDefault's profile still has some cruft in it that really should be in extensions, they'll be cleaned up later.)

In extension profiles you can also *remove* some objects if needed. In a few cases you have additional latitude, for instance for skin layers you can use insert-after or insert-before to specify where your skin should be placed. Ask if you need to know the syntax (or read the code :)).

A customer product has the choice of writing a new base profile, but then changes in CPS itself will be hard to follow and they'll have to be merged by hand in your profile, or writing an extension profile, which is just a sort of diff.

Of course a third-party product that defines new ways of doing configuration, usually with a new tool, will also have to write some code to express how to do the XML import and export of this tool. There are lots of examples of how to do that in CMFCore and CPS (exportimport.py files or exportimport/ directory). In that case there will be information in toolset.xml, import_steps.xml and export_steps.xml for the tool.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]



_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to