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 expressionspm, by looking for substring matcheseq, by looking for equality of strings| Modifier and Type | Field and Description |
|---|---|
protected Condition |
condition |
static Set<String> |
NUMERIC_FIELDS |
protected String |
op |
protected Operator |
operator |
protected TreeSet<String> |
values |
protected String |
variable |
| Modifier | Constructor and Description |
|---|---|
protected |
Match() |
|
Match(String variable) |
|
Match(String variable,
Operator op,
String value) |
|
Match(String variable,
String value) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
@XStreamAsAttribute protected String op
protected String variable
protected Operator operator
protected Condition condition
protected Match()
public Match(String variable)
public String getOperator()
public void setOperator(String op)
public Operator getOp()
public String getVariable()
public void setVariable(String variable)
variable - the variable to setpublic String getValue()
public Object getValueObject()
public void setValue(String val)
public String toXML()
Copyright © 2015 jwall.org. All Rights Reserved.