Package org.oddjob.arooa.standard
Class StandardPropertyManager
java.lang.Object
org.oddjob.arooa.standard.StandardPropertyManager
- All Implemented Interfaces:
PropertyLookup,PropertyManager
Standard implementation of a
PropertyManager.- Author:
- rob
-
Field Summary
Fields inherited from interface org.oddjob.arooa.runtime.PropertyLookup
SYSTEM_PROPERTY_SOURCE -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.StandardPropertyManager(Properties properties, String source) Constructor with some properties.Constructor the defers first to a parent.StandardPropertyManager(PropertyManager parent, Properties properties, String source) Constructor that defers first to parent, then to given properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyLookup(PropertyLookup propertyLookup) Add a lookup.voidaddPropertyOverride(PropertyLookup propertyLookup) Add a property overrides.Return the value of a property, or null if it doesn't exist.Return all property names in this property lookup.voidremovePropertyLookup(PropertyLookup propertyLookup) Remove a lookup.Return a source for the property.
-
Constructor Details
-
StandardPropertyManager
public StandardPropertyManager()Default Constructor. Initially only system properties are available. -
StandardPropertyManager
Constructor with some properties. System properties will override given properties.- Parameters:
properties-source- The name of the source of the properties.
-
StandardPropertyManager
Constructor the defers first to a parent. No system properties will be returned unless by the parent.- Parameters:
parent-
-
StandardPropertyManager
Constructor that defers first to parent, then to given properties.- Parameters:
parent-properties-source- The name of the source of the properties.
-
-
Method Details
-
addPropertyLookup
Description copied from interface:PropertyManagerAdd a lookup. Lookups are used in the order they are added.- Specified by:
addPropertyLookupin interfacePropertyManager- Parameters:
propertyLookup-
-
addPropertyOverride
Description copied from interface:PropertyManagerAdd a property overrides. Overrides are used first.- Specified by:
addPropertyOverridein interfacePropertyManager- Parameters:
propertyLookup-
-
removePropertyLookup
Description copied from interface:PropertyManagerRemove a lookup.- Specified by:
removePropertyLookupin interfacePropertyManager- Parameters:
propertyLookup-
-
lookup
Description copied from interface:PropertyLookupReturn the value of a property, or null if it doesn't exist.- Specified by:
lookupin interfacePropertyLookup- Parameters:
propertyName- The name of the property.- Returns:
- The value or null.
-
propertyNames
Description copied from interface:PropertyLookupReturn all property names in this property lookup.- Specified by:
propertyNamesin interfacePropertyLookup- Returns:
- The property names. Never null.
-
sourceFor
Description copied from interface:PropertyLookupReturn a source for the property.- Specified by:
sourceForin interfacePropertyLookup- Parameters:
propertyName- The property name.- Returns:
- The source, or null if the property isn't known.
-