[opencms-dev] Alpha 1 - Alternate location to define resource types.

Frank Febbraro frankfebbraro at gmail.com
Thu Sep 23 01:35:45 CEST 2004


Great response, thanks

see comments below.

> > I guess I'm looking for a way to have that configuration
> > included in the module itself, making as few mods to the
> > OpenCMS installation as possible.
> 
> As already said this is not yet implemented.
> 
> There are 2 main reasons for this:
> 
> 1. All XML is checked by DTD. So adding these to the module XML would mean
> adding this to the module DTD also. Now since there are many XML
> configuration nodes (other users will certrainly need to add other
> configuration features to a module) we need a more clever way of doing this
> without actually duplication all possible DTDs from other configuration
> parts to the module DTD.

If we could use XML Schema they have ways of including other Schema
defined in separate files. Either that or make each module have a
config/ directory and allow the files of the same structure to be in
config/, such as module-vfs.xml, module-workspace.xml.

> 2. The whole XML configuration is read-write. After reading the
> configuration the XML is transformed to Java objects. E.g. the resource
> types are managed in a java.util.List inside the
> org.opencms.loader.CmsResourceManager (or so) class. Now the "read from
> configuration" part would be easy to implement if 1) above is figured out
> somehow. BUT how to implement the "write" part? How do I know what resource
> in the List has been added by what module, and so must be written to
> opencms-modules.xml or opencms-system.xml? Somehow one must devise a clever
> way to distinguish the configurated objects so that it's still possible to
> write the XML again.

Are these XML configurations written out as part of the export
process? I can see how it would get tricky. Maybe all configurable
resources must have an "origin" that defines where it was loaded, and
that will assist in it's export. I was thinking of these modules as
like a WAR or EAR file (in concept) in that they could be entirely
self contained, that will require more work but will make these
modules easier to distribute and install.

Also, is it possible to define the Back Office UIs for my new Resource
Types inside the module, or must they be in the
/system/workspace/common folder with the other UIs?

Thanks for the responses, they are really helping me get a good understanding.
Frank



More information about the opencms-dev mailing list