Class ComponentConfiguration

java.lang.Object
com.germinus.easyconf.ComponentConfiguration

public class ComponentConfiguration extends Object
Contains the configuration of an EasyConf component including properties configuration and an object graph configuration.
Version:
$Revision: 1.11 $
Author:
Jorge Ferrer
  • Field Details

    • log

      private static final Log log
    • properties

      private ComponentProperties properties
    • componentName

      private String componentName
    • confManager

      private ConfigurationLoader confManager
    • companyId

      private String companyId
    • confObjectsCache

      private Map confObjectsCache
  • Constructor Details

    • ComponentConfiguration

      public ComponentConfiguration(String componentName)
    • ComponentConfiguration

      public ComponentConfiguration(String companyId, String componentName)
  • Method Details

    • getComponentName

      public String getComponentName()
      Get the name of the component which is associated with this configuration
    • getConfigurationObject

      public 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)
    • getConfigurationObject

      public Object getConfigurationObject(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)
    • saveConfigurationObject

      public void saveConfigurationObject(Object configurationObject)
      Update or create a new default configuration Object to a persistent storage. In order to make this method work it should be stablished a configuration-objects-source to a database as explained in the docs. If the source of configuration objects does not allow persistent storage (which is the default) an exception will be thrown.
      Parameters:
      obj -
    • saveConfigurationObject

      public void saveConfigurationObject(String confName, Object configurationObject)
      Update or create a new Object with the given name to a persistent storage. In order to make this method work it should be stablished a configuration-objects-source to a database as explained in the docs. If the source of configuration objects does not allow persistent storage (which is the default) an exception will be thrown.
      Parameters:
      obj -
    • getConfigurationManager

      private ConfigurationLoader getConfigurationManager()
    • getProperties

      public ComponentProperties getProperties()
      Get a typed map of the properties associated with this component
    • getAvailableProperties

      private ComponentProperties getAvailableProperties()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object