org.rhq.plugins.apache.util
Class AugeasNodeSearch

java.lang.Object
  extended by org.rhq.plugins.apache.util.AugeasNodeSearch

public class AugeasNodeSearch
extends Object


Field Summary
static String[] NESTED_DIRECTIVES
           
 
Constructor Summary
AugeasNodeSearch()
           
 
Method Summary
static AugeasNode findNodeById(AugeasNode parentNode, String params)
           
static List<AugeasNode> getNodeByParentParams(AugeasNode parentNode, String nodeName, List<String> nodeParams)
           
static AugeasNode getNodeFromParentById(AugeasNode parentNode, String params)
           
static int getNodeIndex(AugeasNode node)
          If there is a more nodes which have the same node name and the same value of parameters than we need index for identification of Node.
static String getNodeKey(AugeasNode node, AugeasNode parentNode)
          Returns the unique identifier of node.
static String getNodeKeyFromParent(AugeasNode node)
          Returns the unique identifier of node.
static String getNodeParamString(AugeasNode nd)
          Returns all params of node as one string.
static List<String> getParams(AugeasNode node, AugeasNode parentNode)
           
static List<AugeasNode> searchNode(String[] parentNodeNames, String nodeName, AugeasNode startNode)
          Searches for all nodes in parent nodes's subtree which matches specified criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NESTED_DIRECTIVES

public static String[] NESTED_DIRECTIVES
Constructor Detail

AugeasNodeSearch

public AugeasNodeSearch()
Method Detail

searchNode

public static List<AugeasNode> searchNode(String[] parentNodeNames,
                                          String nodeName,
                                          AugeasNode startNode)
Searches for all nodes in parent nodes's subtree which matches specified criteria.

Parameters:
parentNodeNames -
nodeName -
startNode -
Returns:

getNodeByParentParams

public static List<AugeasNode> getNodeByParentParams(AugeasNode parentNode,
                                                     String nodeName,
                                                     List<String> nodeParams)

getParams

public static List<String> getParams(AugeasNode node,
                                     AugeasNode parentNode)

getNodeParamString

public static String getNodeParamString(AugeasNode nd)
Returns all params of node as one string.

Parameters:
nd -
Returns:

getNodeIndex

public static int getNodeIndex(AugeasNode node)
If there is a more nodes which have the same node name and the same value of parameters than we need index for identification of Node.

Parameters:
node -
Returns:

getNodeKeyFromParent

public static String getNodeKeyFromParent(AugeasNode node)
Returns the unique identifier of node. By this string we can identify node from parentNode's child nodes.

Parameters:
node -
Returns:

getNodeKey

public static String getNodeKey(AugeasNode node,
                                AugeasNode parentNode)
Returns the unique identifier of node. By this string we can identify the node in parent node's subtree.

Parameters:
node -
parentNode -
Returns:

findNodeById

public static AugeasNode findNodeById(AugeasNode parentNode,
                                      String params)

getNodeFromParentById

public static AugeasNode getNodeFromParentById(AugeasNode parentNode,
                                               String params)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.