Class ContainerConfigImpl

    • Field Detail

      • items

        protected java.util.Vector<BaseConfiguration> items
        Collection of config objects in the container
    • Constructor Detail

      • ContainerConfigImpl

        public ContainerConfigImpl()
        Constructor for the ContainerConfigImpl object
      • ContainerConfigImpl

        public ContainerConfigImpl​(java.lang.Object data)
        Constructor for the ContainerConfigImpl object
        Parameters:
        data - TreeMap of attribute/value pairs
    • Method Detail

      • getInheritedConfigurations

        public java.util.List<BaseConfiguration> getInheritedConfigurations​(java.util.List<BaseConfiguration> list)
        Returns a list of config items from this object and inherited containers
        Specified by:
        getInheritedConfigurations in interface ContainerConfig
        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

        public java.util.List<BaseConfiguration> getConfigurations​(java.util.List<BaseConfiguration> list)
        Returns a flattened list of the entire tree of config items.
        Specified by:
        getConfigurations in interface ContainerConfig
        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
      • indexOf

        public int indexOf​(BaseConfiguration config)
        Returns the position of a configuration object in a container
        Specified by:
        indexOf in interface ContainerConfig
        Parameters:
        config - Configuration object in the container
        Returns:
        The position of the Configuration object in the collection of configuration objects in the container
      • indexOf

        public int indexOf​(java.lang.String name)
        Returns the index of the config
        Specified by:
        indexOf in interface ContainerConfig
        Parameters:
        name - The name of the configuration object
        Returns:
        The position of the configuration object in the collection of configuration objects
      • getConfig

        public BaseConfiguration getConfig​(int index)
        This method returns the configuration object, which is at position index
        Specified by:
        getConfig in interface ContainerConfig
        Parameters:
        index - The position of the configuration object
        Returns:
        Class representing the configuration of the object
      • getConfig

        public BaseConfiguration getConfig​(java.lang.String name)
        Returns the config with the specified name
        Specified by:
        getConfig in interface ContainerConfig
        Parameters:
        name - The config's name
        Returns:
        The connector configuration object or null if config wasn't found
      • getConfig

        public BaseConfiguration getConfig​(java.lang.String name,
                                           boolean recursive)
        Returns the config with the specified name
        Specified by:
        getConfig in interface ContainerConfig
        Parameters:
        name - The config's name
        recursive - If true, searches through all the components in a container
        Returns:
        The connector configuration object or null if config wasn't found
      • addConfig

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

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

        public BaseConfiguration removeConfig​(int index)
        This method removes a configuration object from the container
        Specified by:
        removeConfig in interface ContainerConfig
        Parameters:
        index - Index of the configuration object
        Returns:
        The configuration object that is removed
      • removeConfig

        public boolean removeConfig​(BaseConfiguration config)
        This method removes a configuration object from the container
        Specified by:
        removeConfig in interface ContainerConfig
        Parameters:
        config - The configuration object to remove
        Returns:
        true if the remove operation is successful. Otherwise, returns false.
      • removeConfig

        public boolean removeConfig​(java.lang.String name,
                                    boolean recursive)
        This method removes a configuration object from the container
        Specified by:
        removeConfig in interface ContainerConfig
        Parameters:
        name - The name of the configuration to remove
        recursive - If true, searches through all the components in a container
        Returns:
        true, if the remove operation is successful. Otherwise returns false.
      • moveConfig

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

        public boolean moveConfig​(BaseConfiguration config,
                                  boolean up)
        Moves a config one position up or down
        Specified by:
        moveConfig in interface ContainerConfig
        Parameters:
        up - Up (true) or down (false)
        config - The configuration object to move.
        Returns:
        true if the operation succeeded
      • moveConfig

        public int moveConfig​(BaseConfiguration config,
                              int position)
        Moves a config from one position to another
        Specified by:
        moveConfig in interface ContainerConfig
        Parameters:
        position - New position
        config - The configuration object to move
        Returns:
        The current position of the configuration
      • containsConfig

        public boolean containsConfig​(java.lang.String name,
                                      boolean recursive)
        Returns true if there is a config having the provided name.
        Specified by:
        containsConfig in interface ContainerConfig
        Parameters:
        name - The name of the config 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