Class DefaultConfigurationFactory

    • Constructor Detail

      • DefaultConfigurationFactory

        public DefaultConfigurationFactory()
        Register default configurations.
    • Method Detail

      • setLogger

        public void setLogger​(Logger logger)
        Overriden in order to set the logger on ancillary components.
        Specified by:
        setLogger in interface Loggable
        Overrides:
        setLogger in class LoggedObject
        Parameters:
        logger - the logger to set and set in the ancillary objects
      • isConfigurationRegistered

        public boolean isConfigurationRegistered​(String containerId,
                                                 ContainerType containerType,
                                                 ConfigurationType configurationType)
        Specified by:
        isConfigurationRegistered in interface ConfigurationFactory
        Parameters:
        containerId - the container id attached to this configuration class
        containerType - the container type attached to this configuration class
        configurationType - the type to differentiate this configuration from others for the specified container
        Returns:
        true if the specified configuration is already registered or false otherwise
      • registerConfiguration

        public void registerConfiguration​(String containerId,
                                          ContainerType containerType,
                                          ConfigurationType configurationType,
                                          Class<? extends Configuration> configurationClass)
        Registers a configuration implementation.
        Specified by:
        registerConfiguration in interface ConfigurationFactory
        Parameters:
        containerId - the container id attached to this configuration class
        containerType - the container type attached to this configuration class
        configurationType - the type to differentiate this configuration from others for the specified container
        configurationClass - the configuration implementation class to register
      • getConfigurationClass

        public Class<? extends Configuration> getConfigurationClass​(String containerId,
                                                                    ContainerType containerType,
                                                                    ConfigurationType configurationType)
        Specified by:
        getConfigurationClass in interface ConfigurationFactory
        Parameters:
        containerId - the container id attached to this configuration class
        containerType - the container type attached to this configuration class
        configurationType - the configuration's type
        Returns:
        the configuration implementation class
      • createConfiguration

        public Configuration createConfiguration​(String containerId,
                                                 ContainerType containerType,
                                                 ConfigurationType configurationType)
        Create a configuration instance matching the specified container and type.
        Specified by:
        createConfiguration in interface ConfigurationFactory
        Parameters:
        containerId - the id of the container for which to create a configuration
        containerType - the type of the container for which to create a configuration
        configurationType - the type that differentiates the configuration we wish to create from other configurations for this container
        Returns:
        the configuration instance
      • createConfiguration

        public Configuration createConfiguration​(String containerId,
                                                 ContainerType containerType,
                                                 ConfigurationType configurationType,
                                                 String home)
        Create a configuration instance matching the specified container and type.
        Specified by:
        createConfiguration in interface ConfigurationFactory
        Parameters:
        containerId - the id of the container for which to create a configuration
        containerType - the type of the container for which to create a configuration
        configurationType - the type that differentiates the configuration we wish to create from other configurations for this container
        home - the configuration home
        Returns:
        the configuration instance