public class SystemPropertiesPreProcessor extends VariablePreProcessorImpl
ConfigurationPreProcessor
implementation that supports substitution of system properties
before configuration is un-marshalled.
This ConfigurationPreProcessor can be activated by the setting or appending to the bootstrap property "preProcessors" to be systemProperties and making sure the required jars are available on the classpath.
The following properties can be specified in the bootstrap.properties to control the behaviour of the variable substitution;
Property | Default | Mandatory | Description |
---|---|---|---|
"system-properties.varprefix" | "${" | No | The value here will be prepended to the system property to search for in the configuration to be switched out. |
"system-properties.varpostfix" | "}" | No | The value here will be appended to the system property to search for in the configuration to be switched out. |
"system-properties.impl" | SIMPLE | No | The substitution engine that will perform the variable substitution. defaults to SIMPLE
(Constants.DEFAULT_VAR_SUB_IMPL ). |
preProcessors=systemProperties
Then all available system properties (such as user.dir
, provided they are marked as ${user.dir}
) will be
replaced within the adapter.xml as it is read in, but before the Adapter itself is unmarshalled.Constructor and Description |
---|
SystemPropertiesPreProcessor(BootstrapProperties bootstrapProperties) |
SystemPropertiesPreProcessor(KeyValuePairSet kvps) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
expand(java.lang.String xml) |
process, process
getBootstrapProperties, getConfiguration, getProperties, setBootstrapProperties, setConfiguration, setProperties
public SystemPropertiesPreProcessor(BootstrapProperties bootstrapProperties)
public SystemPropertiesPreProcessor(KeyValuePairSet kvps)
protected java.lang.String expand(java.lang.String xml) throws CoreException
expand
in class VariablePreProcessorImpl
CoreException