Interface TreeNode

    • Method Detail

      • getCategory

        String getCategory()
      • setCategory

        void setCategory​(String category)
      • isEnabled

        boolean isEnabled()
      • setEnabled

        void setEnabled​(boolean enabled)
      • setDescription

        void setDescription​(String description)
      • getDescription

        String getDescription()
      • removeChild

        void removeChild​(TreeNode oldChild)
      • setParent

        void setParent​(TreeNode parent)
      • getCompletePathName

        String getCompletePathName()
        Returns:
        complete dotted name to this node
      • hasChildNodes

        boolean hasChildNodes()
      • getChildNodes

        Collection<TreeNode> getChildNodes()
        Returns:
        Collection collection of children
      • getEnabledChildNodes

        Collection<TreeNode> getEnabledChildNodes()
        Returns:
        Collection collection of children
      • getNode

        TreeNode getNode​(String completeName)
        Parameters:
        completeName - dotted name to the node
        Returns:
        TreeNode uniquely identified tree node. Null if no matching tree node.
      • traverse

        List<TreeNode> traverse​(boolean ignoreDisabled)
        Performs a depth first traversal of the tree. Returns all the nodes in the tree unless ignoreDisabled flag is turned on.
        Parameters:
        ignoreDisabled - will ignore a disabled node and its children
        Returns:
        List lists all nodes under the current sub tree.
      • getNodes

        List<TreeNode> getNodes​(String pattern,
                                boolean ignoreDisabled,
                                boolean gfv2Compatible)
        Returns all nodes that match the given Regex pattern as specified by the Pattern class. Admin CLI in GlassFish v2 did not use Pattern's specified in java.util.Pattern. It had a simpler mechanism where * was equivalent to .* from Pattern If the V2Compatible flag is turned on, then the pattern is considered a v2 pattern.
        Parameters:
        pattern - Find a node that matches the pattern. By default pattern should follow the conventions outlined by the java.util.regex.Pattern class.
        ignoreDisabled - will ignore a disabled node and its children
        gfv2Compatible - in this mode, * has the same meaning as .* in the Pattern class. The implementation should consider pattern as a v2 pattern.
        Returns:
      • getPossibleParentNode

        TreeNode getPossibleParentNode​(String pattern)
        Get the "parent" matching the given pattern. E.g "server.jvm.memory.maxheapsize-count" is the parent of "server.jvm.memory.maxheapsize-count-count" Note that in V3 the latter will NOT be found with getNodes()
        Parameters:
        pattern - Find a node that matches the pattern. By default pattern should follow the conventions outlined by the java.util.regex.Pattern class.
        Returns:
        The parent node if found otherwise null.