org.rhq.plugins.apache.mapping
Class ApacheDirectiveRegExpression
java.lang.Object
org.rhq.plugins.apache.mapping.ApacheDirectiveRegExpression
public class ApacheDirectiveRegExpression
- extends Object
The httpd lens doesn't give us very detailed information about the directive
parameters.
It just supplies a list of "param" nodes each containing a value for one
parameter of a directive (how we wish it could be otherwise and the lens be more sophisticated).
In order to extract the useful information from this that we can use for mapping these
params to RHQ configuration properties, we define a series of regular expressions
that are designed to work with a space concatenated list of params supplied by Augeas.
In these regular expressions, each capturing group corresponds (in the exact order) to
the properties defined in the resource configurations.
- Author:
- Filip Drabek, Lukas Krejci
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WORD
public static final String WORD
- See Also:
- Constant Field Values
WS
public static final String WS
- See Also:
- Constant Field Values
WS_MAN
public static final String WS_MAN
- See Also:
- Constant Field Values
NUM
public static final String NUM
- See Also:
- Constant Field Values
ApacheDirectiveRegExpression
public ApacheDirectiveRegExpression()
getParams
public static List<String> getParams(AugeasNode parentNode)
- Parses the parameters of the supplied node and returns a list
of strings, each containing a value for a simple property
corresponding to that parameter.
A null value means that the parameters for given property
was not defined in the configuration file.
- Parameters:
parentNode - the node containing the "param" sub nodes to parse
- Returns:
- the list of mappable parameters
createParams
public static List<String> createParams(String params,
String name)
getMappingType
public static DirectiveMapping getMappingType(String directiveName)
- The properties in the resource configuration share a couple of common
patterns how they map to the augeas tree. This method returns the corresponding
mapping type for a directive.
- Parameters:
directiveName - the directive to find out the mapping type of.
- Returns:
- the mapping type that can be used to perform the mapping to the property.
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.