Class WritableResourceNode<W extends WritableResourceNode<W>>

    • Constructor Detail

      • WritableResourceNode

        public WritableResourceNode()
    • Method Detail

      • createConfig

        public abstract WritableResourceNode<W> createConfig​(String key)
                                                      throws de.mhus.lib.errors.MException
        Create a new config and append it at the end of the list. After creation the element is already at the end of the list.
        Parameters:
        key -
        Returns:
        new config node
        Throws:
        de.mhus.lib.errors.MException - if editing is not possible
      • moveConfig

        public abstract int moveConfig​(W config,
                                       int newPos)
                                throws de.mhus.lib.errors.MException
        Move the position of the configuration in the hole set of configurations. If the config is not part of the set it will throw an exception. The first position is 0.
        Parameters:
        config - The config object which you want to move
        newPos - Absolute new position or one of the move operators MOVE_UP, MOVE_DOWN, MOVE_FIRST, MOVE_LAST
        Returns:
        The new pos of the config
        Throws:
        de.mhus.lib.errors.MException - if editing is not possible or the position is out of range
      • removeConfig

        public abstract void removeConfig​(W config)
                                   throws de.mhus.lib.errors.MException
        Remove a config element from the set. If the config element is not part of the set it will not throw an error.
        Parameters:
        config - The config object which should be removed.
        Throws:
        de.mhus.lib.errors.MException - if editing is not possible