Now that OFBiz supports XML properties files, I've started thinking about David's comment that
configuration settings and such should be kept in the database - and how to add that capability to
the UtilProperties class bag of tricks.
Just like the XML properties file idea, I'd like to make it transparent to the developer. I'm
thinking we would need only one entity, and a little more work on the UtilProperties class.
The entity would be something like:
ResourceProperties
------------------
ResourceName, id-long
PropertyKey, id-long
PropertyValue, very-long
So, if you called UtilProperties.getPropertyValue("MyResource", "MyProperty") the usual properties
files would be checked first, and if that failed, the ResourceProperties entity would be searched.
UtilProperties would keep the entity version of Properties objects in the same cache as regular
file-based Properties objects.
What do you think?
The only thing I haven't figured out is how to get a delegator instance. In the example above, there
are two String parameters - no delegator. I know I can call
GenericDelegator.getGenericDelegator(String delegatorName) but what delegator name do I use? Any
ideas on how that would/should work?
-Adrian