Interface ContainerConfig

    • Method Detail

      • size

        int size()
        This method returns the number of BaseConfiguration objects in the container
        Specified by:
        size in interface BaseConfiguration
        Returns:
        Number of BaseConfiguration objects
      • indexOf

        int indexOf​(BaseConfiguration config)
        Returns the index of the BaseConfiguration
        Parameters:
        config - component BaseConfiguration
      • indexOf

        int indexOf​(java.lang.String name)
        Returns the index of the BaseConfiguration
        Parameters:
        name - component BaseConfiguration name to lookup
      • getInheritedConfigurations

        java.util.List<BaseConfiguration> getInheritedConfigurations​(java.util.List<BaseConfiguration> list)
        Returns a List of BaseConfiguration items from this object and inherited containers
        Parameters:
        list - If not null, BaseConfiguration items are added to this list
        Returns:
        The provided List or a new List object with the contents of inherited configurations
      • getConfigurations

        java.util.List<BaseConfiguration> getConfigurations​(java.util.List<BaseConfiguration> list)
        Returns a flattened list of the entire tree of config items.
        Parameters:
        list - If not null, config items are added to this list
        Returns:
        The provided list or a new list object with the contents of this container and child containers
      • getConfig

        BaseConfiguration getConfig​(int index)
        This method returns the configuration object at index
        Parameters:
        index - The configuration object
      • getConfig

        BaseConfiguration getConfig​(java.lang.String name,
                                    boolean recursive)
        Returns the BaseConfiguration with the specified name traversing child objects of type ContainerConfig if recursive is true.
        Parameters:
        name - The config's name
        recursive - Traverse child ContainerConfigs if true
        Returns:
        The configuration object or null if config wasn't found
      • getConfig

        BaseConfiguration getConfig​(java.lang.String name)
        Returns the BaseConfiguration with the specified name in this container. This method does not traverse child containers.
        Parameters:
        name - The config's name
        Returns:
        The configuration object or null if config wasn't found
      • addConfig

        int addConfig​(BaseConfiguration config)
        This method adds a configuration object to the container
        Parameters:
        config - The configuration object
        Returns:
        Index of the new configuration object
      • insertConfig

        int insertConfig​(BaseConfiguration config,
                         int position)
        This method inesrts a configuration object at the specified index
        Parameters:
        config - The configuration object
        position - Position of the new object
        Returns:
        Index of the new configuration object
      • removeConfig

        BaseConfiguration removeConfig​(int index)
        This method removes a configuration object from the container
        Parameters:
        index - Index of the configuration object
      • removeConfig

        boolean removeConfig​(BaseConfiguration config)
        Removes a component from the container
        Parameters:
        config - component config
      • removeConfig

        boolean removeConfig​(java.lang.String name,
                             boolean recursive)
        This method removes a named configuration object from the container or its subcontainers
        Parameters:
        name - Name of the configuration object
        recursive - True if child containers should be searched
      • moveConfig

        boolean moveConfig​(int position,
                           boolean up)
        Moves a BaseConfiguration one position up or down
        Parameters:
        position - Current connector position
        up - Up (true) or down (false)
        Returns:
        true if the operation succeeded
      • moveConfig

        boolean moveConfig​(BaseConfiguration config,
                           boolean up)
        Moves a BaseConfiguration one position up or down
        Parameters:
        config - The BaseConfiguration to move
        up - Up (true) or down (false)
        Returns:
        true if the operation succeeded
      • moveConfig

        int moveConfig​(BaseConfiguration config,
                       int position)
        Moves a BaseConfiguration to a new position
        Parameters:
        config - Component BaseConfiguration
        position - New position
        Returns:
        The components new position
      • containsConfig

        boolean containsConfig​(java.lang.String name,
                               boolean recursive)
        Returns true if a BaseConfiguration with the provided name can be found.
        Parameters:
        name - The name of the BaseConfiguration item
        recursive - If true, a tree walk will be performed when checking for the name
        Returns:
        TRUE if there is an object with the provided name