Interface ComponentConfigService


  • public interface ComponentConfigService
    Service for tracking system-wide configurations for various software components.
    • Method Detail

      • getComponentNames

        Set<String> getComponentNames()
        Returns names of all components that have registered their configuration properties.
        Returns:
        set of component names
      • registerProperties

        void registerProperties​(Class<?> componentClass)
        Registers configuration properties for the specified component.
        Parameters:
        componentClass - class of configurable component
      • unregisterProperties

        void unregisterProperties​(Class<?> componentClass,
                                  boolean clear)
        Unregisters configuration properties for the specified component.
        Parameters:
        componentClass - class of configurable component
        clear - true indicates any settings should be cleared
      • getProperties

        Set<ConfigProperty> getProperties​(String componentName)
        Returns configuration properties of the named components.
        Parameters:
        componentName - component name
        Returns:
        set of configuration properties
      • setProperty

        void setProperty​(String componentName,
                         String name,
                         String value)
        Sets the value of the specified configuration property.
        Parameters:
        componentName - component name
        name - property name
        value - new property value
      • preSetProperty

        void preSetProperty​(String componentName,
                            String name,
                            String value)
        Presets the value of the specified configuration property, regardless of the component's state.
        Parameters:
        componentName - component name
        name - property name
        value - new property value
      • preSetProperty

        void preSetProperty​(String componentName,
                            String name,
                            String value,
                            boolean override)
        Presets the value of the specified configuration property, regardless of the component's state.
        Parameters:
        componentName - component name
        name - property name
        value - new property value
        override - true to override even if the property has been set to other value
      • unsetProperty

        void unsetProperty​(String componentName,
                           String name)
        Clears the value of the specified configuration property thus making the property take on its default value.
        Parameters:
        componentName - component name
        name - property name
      • getProperty

        ConfigProperty getProperty​(String componentName,
                                   String attribute)
        Returns configuration property of the named components.
        Parameters:
        componentName - component name
        attribute - component attribute
        Returns:
        configuration property