com.germinus.easyconf
public class ComponentConfiguration extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
companyId |
private java.lang.String |
componentName |
private ConfigurationLoader |
confManager |
private java.util.Map |
confObjectsCache |
private static Log |
log |
private ComponentProperties |
properties |
Constructor and Description |
---|
ComponentConfiguration(java.lang.String componentName) |
ComponentConfiguration(java.lang.String companyId,
java.lang.String componentName) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
private ComponentProperties |
getAvailableProperties() |
java.lang.String |
getComponentName()
Get the name of the component which is associated with this configuration
|
private ConfigurationLoader |
getConfigurationManager() |
java.lang.Object |
getConfigurationObject()
Get an object which represents the default configuration of component
The object is populated using the digester rules defined in the file
componentName.digesterRules.xml which must be found in the classpath (first it is
searched in the context of the current thread and then in the context of the system
classpath)
|
java.lang.Object |
getConfigurationObject(java.lang.String confName)
Get an object which represents a named configuration of the component
The object is populated using the digester rules defined in the file
componentName.digesterRules.xml which must be found in the classpath (first it is
searched in the context of the current thread and then in the context of the system
classpath)
|
ComponentProperties |
getProperties()
Get a typed map of the properties associated with this component
|
int |
hashCode() |
void |
saveConfigurationObject(java.lang.Object configurationObject)
Update or create a new default configuration Object to a persistent storage.
|
void |
saveConfigurationObject(java.lang.String confName,
java.lang.Object configurationObject)
Update or create a new Object with the given name to a persistent storage.
|
private static final Log log
private ComponentProperties properties
private java.lang.String componentName
private ConfigurationLoader confManager
private java.lang.String companyId
private java.util.Map confObjectsCache
public ComponentConfiguration(java.lang.String componentName)
public ComponentConfiguration(java.lang.String companyId, java.lang.String componentName)
public java.lang.String getComponentName()
public java.lang.Object getConfigurationObject()
ConfigurationException
- if the object graph cannot be readpublic java.lang.Object getConfigurationObject(java.lang.String confName)
ConfigurationException
- if the object graph cannot be readpublic void saveConfigurationObject(java.lang.Object configurationObject)
obj
- public void saveConfigurationObject(java.lang.String confName, java.lang.Object configurationObject)
obj
- private ConfigurationLoader getConfigurationManager()
public ComponentProperties getProperties()
private ComponentProperties getAvailableProperties()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object