|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.property.basic.BasicPropertyFactory org.modeshape.graph.property.basic.SystemPropertyFactory
@Immutable public class SystemPropertyFactory
An implementation of PropertyFactory
which provides the feature for substituting special decorated variables (i.e.,
${variable}) with a system property. This will support the following decorated syntax options:
Where the variable represents a value to be looked up in the System properties and defaultvalue indicates what to use when the System property is not found.
Notice that the syntax supports multiple variables. The logic will process the variables from let to right, until a System property is found. And at that point, it will stop and will not attempt to find values for the other variables.
Constructor Summary | |
---|---|
SystemPropertyFactory(ValueFactories valueFactories)
|
Method Summary | |
---|---|
Property |
create(Name name,
PropertyType desiredType,
Iterable<?> values)
Create a property with the supplied name and values |
Property |
create(Name name,
PropertyType desiredType,
Iterator<?> values)
Create a property with the supplied name and values |
Property |
create(Name name,
PropertyType desiredType,
Object... values)
Create a property with the supplied name and values |
protected String |
getSubstitutedProperty(String value)
getSubstitutedProperty is called to perform the property substitution on the value. |
Methods inherited from class org.modeshape.graph.property.basic.BasicPropertyFactory |
---|
create, create, create, create |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemPropertyFactory(ValueFactories valueFactories)
valueFactories
- the value factories
IllegalArgumentException
- if the reference to the value factories is nullMethod Detail |
---|
public Property create(Name name, PropertyType desiredType, Object... values)
create
in interface PropertyFactory
create
in class BasicPropertyFactory
name
- the property name; may not be nulldesiredType
- the type that the objects should be converted to; if null, they will be used as isvalues
- the values
public Property create(Name name, PropertyType desiredType, Iterable<?> values)
create
in interface PropertyFactory
create
in class BasicPropertyFactory
name
- the property name; may not be nulldesiredType
- the type that the objects should be converted to; if null, they will be used as isvalues
- the values
public Property create(Name name, PropertyType desiredType, Iterator<?> values)
create
in interface PropertyFactory
create
in class BasicPropertyFactory
name
- the property name; may not be nulldesiredType
- the type that the objects should be converted to; if null, they will be used as isvalues
- the values
protected String getSubstitutedProperty(String value)
value
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |