Class ConfigRegistry

    • Constructor Detail

      • ConfigRegistry

        public ConfigRegistry()
    • Method Detail

      • getConfigAttribute

        public <T> T getConfigAttribute​(ConfigAttribute<T> configAttribute,
                                        String targetDisplayMode,
                                        String... configLabels)
        Description copied from interface: IConfigRegistry
        If retrieving registered values

        Example 1:

        configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

        1. It will look for an attribute registered using the EDIT display mode
        2. If it can't find that it will try and find an attribute under the NORMAL mode
        3. If it can't find one it will try and find one registered without a display mode IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
        Example 2:

        configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

        1. It will look for an attribute registered by display mode NORMAL and "testLabel"
        2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
        Specified by:
        getConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        targetDisplayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabels - The config labels the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabels match, null if no value for the specified parameters was found.
      • getConfigAttribute

        public <T> T getConfigAttribute​(ConfigAttribute<T> configAttribute,
                                        String targetDisplayMode,
                                        List<String> configLabels)
        Description copied from interface: IConfigRegistry
        If retrieving registered values

        Example 1:

        configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

        1. It will look for an attribute registered using the EDIT display mode
        2. If it can't find that it will try and find an attribute under the NORMAL mode
        3. If it can't find one it will try and find one registered without a display mode IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
        Example 2:

        configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

        1. It will look for an attribute registered by display mode NORMAL and "testLabel"
        2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
        Specified by:
        getConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        targetDisplayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabels - The config labels the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabels match, null if no value for the specified parameters was found.
      • getConfigAttribute

        public <T> T getConfigAttribute​(ConfigAttribute<T> configAttribute,
                                        DisplayMode targetDisplayMode,
                                        String... configLabels)
        Description copied from interface: IConfigRegistry
        If retrieving registered values

        Example 1:

        configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

        1. It will look for an attribute registered using the EDIT display mode
        2. If it can't find that it will try and find an attribute under the NORMAL mode
        3. If it can't find one it will try and find one registered without a display mode IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
        Example 2:

        configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

        1. It will look for an attribute registered by display mode NORMAL and "testLabel"
        2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
        Specified by:
        getConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        targetDisplayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabels - The config labels the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabels match, null if no value for the specified parameters was found.
      • getConfigAttribute

        public <T> T getConfigAttribute​(ConfigAttribute<T> configAttribute,
                                        DisplayMode targetDisplayMode,
                                        List<String> configLabels)
        Description copied from interface: IConfigRegistry
        If retrieving registered values

        Example 1:

        configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

        1. It will look for an attribute registered using the EDIT display mode
        2. If it can't find that it will try and find an attribute under the NORMAL mode
        3. If it can't find one it will try and find one registered without a display mode IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
        Example 2:

        configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

        1. It will look for an attribute registered by display mode NORMAL and "testLabel"
        2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
        Specified by:
        getConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        targetDisplayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabels - The config labels the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabels match, null if no value for the specified parameters was found.
      • getSpecificConfigAttribute

        public <T> T getSpecificConfigAttribute​(ConfigAttribute<T> configAttribute,
                                                String displayMode,
                                                String configLabel)
        Description copied from interface: IConfigRegistry
        Retrieve a configuration value for the specified DisplayMode and config label. Only checks for the specified DisplayMode and config label. It does not search for more generic values by searching the display mode ordering, labels and default configurations.
        Specified by:
        getSpecificConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        displayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabel - The config label the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabel matches, null if no value for the specified parameters was found.
        See Also:
        IConfigRegistry.getConfigAttribute(ConfigAttribute, String, String...)
      • getSpecificConfigAttribute

        public <T> T getSpecificConfigAttribute​(ConfigAttribute<T> configAttribute,
                                                DisplayMode displayMode,
                                                String configLabel)
        Description copied from interface: IConfigRegistry
        Retrieve a configuration value for the specified DisplayMode and config label. Only checks for the specified DisplayMode and config label. It does not search for more generic values by searching the display mode ordering, labels and default configurations.
        Specified by:
        getSpecificConfigAttribute in interface IConfigRegistry
        Type Parameters:
        T - The type of the configuration attribute.
        Parameters:
        configAttribute - The configuration attribute to be registered.
        displayMode - The display mode the cell needs to be in for this attribute to be returned.
        configLabel - The config label the cell needs to have for this attribute to be returned.
        Returns:
        The configuration attribute if the display mode and the configLabel matches, null if no value for the specified parameters was found.
        See Also:
        IConfigRegistry.getConfigAttribute(ConfigAttribute, DisplayMode, String...)
      • setDisplayModeOrdering

        public void setDisplayModeOrdering​(IDisplayModeOrdering displayModeOrdering)