Class ConfigNodeManager

  • All Implemented Interfaces:
    ConfigNodeService

    public final class ConfigNodeManager
    extends java.lang.Object
    implements ConfigNodeService
    Holds and manages config nodes.
    • Constructor Detail

      • ConfigNodeManager

        public ConfigNodeManager()
        Default constructor for the ConfigNodeManager.
    • Method Detail

      • postProcess

        public GResultOf<java.lang.Boolean> postProcess​(java.util.List<PostProcessor> postProcessors)
                                                 throws GestaltException
        Description copied from interface: ConfigNodeService
        Apply a list of Post Processors on the root node. This allows a post processor to modify the config tree in any way. It will navigate to each node in the tree and pass it to the post processor. The post processors are run in order of priority, with the next post processor getting the results from the previous. The post processor returns a node that is then used to replace the current node.
        Specified by:
        postProcess in interface ConfigNodeService
        Parameters:
        postProcessors - list of post processors to apply.
        Returns:
        if the post process has completed successfully
        Throws:
        GestaltException - any exceptions
      • navigateToNode

        public GResultOf<ConfigNode> navigateToNode​(java.lang.String path,
                                                    java.util.List<Token> tokens,
                                                    Tags tags)
        Description copied from interface: ConfigNodeService
        navigate to a node for a path from the root.
        Specified by:
        navigateToNode in interface ConfigNodeService
        Parameters:
        path - to navigate to
        tokens - list of tokens to navigate to.
        tags - list of tags to match
        Returns:
        GResultOf node or any errors.
      • navigateToNextNode

        public GResultOf<ConfigNode> navigateToNextNode​(java.lang.String path,
                                                        Token token,
                                                        ConfigNode currentNode)
        Description copied from interface: ConfigNodeService
        From a given node navigate to the next node. If an ArrayToken and the config node is an ArrayNode it will return the next node by index. If a ObjectToken and the config node is a MapNode it will return the next node by key.
        Specified by:
        navigateToNextNode in interface ConfigNodeService
        Parameters:
        path - to here for logging.
        token - token for the next node
        currentNode - current node we want to navigate from
        Returns:
        GResultOf node or any errors.
      • navigateToNextNode

        public GResultOf<ConfigNode> navigateToNextNode​(java.lang.String path,
                                                        java.util.List<Token> tokens,
                                                        ConfigNode currentNode)
        Description copied from interface: ConfigNodeService
        From a given node navigate to the next node.
        Specified by:
        navigateToNextNode in interface ConfigNodeService
        Parameters:
        path - to here for logging.
        tokens - list of token for the next node
        currentNode - current node we want to navigate from
        Returns:
        GResultOf node or any errors.