The Fulcrum ResourceManager service handles the management of resources found in a domain whereas multiple domains can be defined. The current implementation uses only the file system to store the resources of a domain. It should be possible to come up with an implementation using a database to store the resources centralized for a cluster.
The service provides the following features:
The key motiviation is reuse the automatic location of a resource since I implemented it a few times over the last two years. A couple services benefit from that behaviour, e.g. the fulcrum-dom4jxslt-service and fulcrum-groovy-service. Using a context and traversing up the file system allows to invoke different XSL file depending on the context. And the only thing to do is just to add a XSL file in the appropriate directory and to overwrite one or more template matching rules to customize the behaviour.
scripts -- magic.groovy -- ABC -- magic.groovy
In the case of invoking 'ABC/magic.groovy' the script 'ABC/magic.groovy' would be executed. In the case of invoking 'XYZ/magic.groovy' the locator is looking for 'XYZ/magic.groovy'. Since it isn't found it steps up a directory to execute 'magic.groovy'.
The service does not provided the following things
I hate to implement any ad-hoc caching since this should be done by a proper cache manager such as JCS. BTW - the caching is quite often done by other services, e.g. a XSLT service caches the the compiled XSL files and not the file content.
And the virtual file system approach is beautiful but I don't need it.