|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.utils.props.AbstractPropertyContainer
public abstract class AbstractPropertyContainer
Provides a mechanism to load properties into objects.
Functions that depend on properties should call ensureProperties() before it uses any properties.
| Constructor Summary | |
|---|---|
AbstractPropertyContainer()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPropertyContainer()
| Method Detail |
|---|
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 failure
public void initializeProperties()
throws ConfigurationException
If the properties object is null, when you call ensureProperties initialize will be called.
ConfigurationException - on configuration failure
protected 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||