public abstract class AbstractPropertyContainer extends Object
Functions that depend on properties should call ensureProperties() before it uses any properties.
| Constructor and Description |
|---|
AbstractPropertyContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureProperties()
Makes sure an AbstractPropertyClass has all the properties it needs.
|
Properties |
getProperties() |
PropertiesFactory |
getPropertiesFactory() |
String |
getPropertiesGroup() |
String |
getPropertiesHeading() |
protected abstract void |
handleProperties()
Sets fields for properties, and verifies that all necessary properties are there.
|
void |
initializeProperties()
Loads the properties and then calls handleProperties.
|
void |
setProperties(Properties properties) |
void |
setPropertiesFactory(PropertiesFactory propertiesFactory) |
void |
setPropertiesGroup(String propertiesGroup) |
void |
setPropertiesHeading(String propertiesHeading) |
public void ensureProperties()
throws ConfigurationException
Synchronized mutators so multiple threads cannot cause problems. We wouldn't want the properties heading to get changed as we were processing the properties.
ConfigurationException - on configuration failurepublic void initializeProperties()
throws ConfigurationException
If the properties object is null, when you call ensureProperties initialize will be called.
ConfigurationException - on configuration failureprotected abstract void handleProperties()
throws ConfigurationException
ConfigurationException - on configuration failurepublic Properties getProperties()
public void setProperties(Properties properties)
properties - The properties to set.public String getPropertiesHeading()
public void setPropertiesHeading(String propertiesHeading)
propertiesHeading - The propertiesHeading to set.public PropertiesFactory getPropertiesFactory()
public void setPropertiesFactory(PropertiesFactory propertiesFactory)
propertiesFactory - The propertiesFactory to set.public String getPropertiesGroup()
public void setPropertiesGroup(String propertiesGroup)
propertiesGroup - The propertiesGroup to set.Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.