Project

General

Profile

Actions

Smart props - DONE » History » Revision 4

« Previous | Revision 4/14 (diff) | Next »
Henning Blohm, 17.07.2016 10:57


Smart Props

The goal of this concept is to provide facilities to simplify sharing of component configuration while still being able to query resolved component configuration efficiently and with minimal resource usage.

Design Draft

What we aim for is an extended properties format that allows declarative inclusion of other component's configuration and the use of some expression language style substitution of vaiables. In other words, we strive for the use of a template processing language.

The prospective candidate is the Java Unified Expression Language based on the implementation JUEL

Built-in implicit contexts include system properties, environment variables, other component properties, the component name, the module name.

Example: A repository declaration could look like this:

com.zfabrik.component.type=com.zfabrik.svncr

svncr.url=${system['svn.repoBaseUrl']}${system.branch}/base
svncr.user=${system['svn.user']}
svncr.passwordr=${system['svn.password']}

Possible extensions

To extend this further, component declarations may indicate their template style via some Shebang, the default being java.util.Properties.

For example:

#!com.zfabrik.components/velocityConfig
#
com.zfabrik.component.type=com.zfabrik.java

#parse('mymodule/spring_template')

java.privateReferences=,\
  ${java_private_references},\
  someotherref

Updated by Henning Blohm almost 8 years ago · 4 revisions