org.jwall.audit
Class Match

java.lang.Object
  extended by 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

All matches can be inverted by prepending an exclamation-mark "!" to the value.

Author:
Christian Bockermann <chris@jwall.org>
See Also:
Serialized Form

Field Summary
static Set<String> NUMERIC_FIELDS
           
 
Constructor Summary
Match(String variable)
           
Match(String variable, Operator op, String value)
           
Match(String variable, String value)
           
 
Method Summary
 Operator getOp()
           
 String getOperator()
           
 String getValue()
           
 Object getValueObject()
           
 String getVariable()
           
 void setOperator(String op)
           
 void setValue(String val)
           
 void setVariable(String variable)
           
 String toString()
           
 String toXML()
          Returns an XML representation of this match.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NUMERIC_FIELDS

public static final Set<String> NUMERIC_FIELDS
Constructor Detail

Match

public Match(String variable)

Match

public Match(String variable,
             String value)

Match

public Match(String variable,
             Operator op,
             String value)
Method Detail

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.