Interface ConfigNodeService

  • All Known Implementing Classes:
    ConfigNodeManager

    public interface ConfigNodeService
    Holds and manages config nodes.
    • Method Detail

      • postProcess

        GResultOf<java.lang.Boolean> postProcess​(java.util.List<PostProcessor> postProcessors)
                                          throws GestaltException
        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.
        Parameters:
        postProcessors - list of post processors to apply.
        Returns:
        if the post process has completed successfully
        Throws:
        GestaltException - any exceptions
      • reloadNode

        GResultOf<ConfigNode> reloadNode​(ConfigNodeContainer reloadNode)
                                  throws GestaltException
        Reload a node, if there are more than one node it will merge it into the config tree in the same order as the existing node. The container node has an ID so we can identity and know which node to reload to preserve order.
        Parameters:
        reloadNode - node to reload.
        Returns:
        the new root node
        Throws:
        GestaltException - any exceptions
      • navigateToNode

        GResultOf<ConfigNode> navigateToNode​(java.lang.String path,
                                             java.util.List<Token> tokens,
                                             Tags tags)
        navigate to a node for a path from the root.
        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

        GResultOf<ConfigNode> navigateToNextNode​(java.lang.String path,
                                                 Token token,
                                                 ConfigNode currentNode)
        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.
        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

        GResultOf<ConfigNode> navigateToNextNode​(java.lang.String path,
                                                 java.util.List<Token> tokens,
                                                 ConfigNode currentNode)
        From a given node navigate to the next node.
        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.