org.jwall.audit
Class Match
java.lang.Object
org.jwall.audit.Match
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AuditEventMatch
public class Match
- extends Object
- implements Serializable
This class implements the most generic ModSecurity-like match. It matches the value of a
given variable against a single or set of values using a specific operator. This implementation
supports the operators
rx, by matching the value against regular expressions
pm, by looking for substring matches
eq, by looking for equality of strings
All matches can be inverted by prepending an exclamation-mark "!" to the value.
- Author:
- Christian Bockermann <chris@jwall.org>
- See Also:
- Serialized Form
NUMERIC_FIELDS
public static final Set<String> NUMERIC_FIELDS
Match
public Match(String variable)
Match
public Match(String variable,
String value)
Match
public Match(String variable,
Operator op,
String value)
getOperator
public String getOperator()
setOperator
public void setOperator(String op)
getOp
public Operator getOp()
getVariable
public String getVariable()
- Returns:
- the variable
setVariable
public void setVariable(String variable)
- Parameters:
variable - the variable to set
getValue
public String getValue()
- Returns:
- the value
getValueObject
public Object getValueObject()
setValue
public void setValue(String val)
toXML
public String toXML()
- Returns an XML representation of this match.
- Returns:
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012 jwall.org. All Rights Reserved.