|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.intake.validator.FieldReference
public class FieldReference
Helper Class to manage relations between fields. The following comparisons are supported:
Name | Valid Values | Default Value |
---|---|---|
less-than | <name of other field> | |
greater-than | <name of other field> | |
less-than-or-equal | <name of other field> | |
greater-than-or-equal | <name of other field> |
Field Summary | |
---|---|
static int |
COMPARE_GT
Integer value for ">" comparison |
static int |
COMPARE_GTE
Integer value for ">=" comparison |
static int |
COMPARE_LT
Integer value for "<" comparison |
static int |
COMPARE_LTE
Integer value for "<=" comparison |
protected static org.apache.commons.logging.Log |
log
a local logger |
static java.lang.String |
RANGE_GT
Rule name for ">" comparison |
static java.lang.String |
RANGE_GTE
Rule name for ">=" comparison |
static java.lang.String |
RANGE_LT
Rule name for "<" comparison |
static java.lang.String |
RANGE_LTE
Rule name for "<=" comparison |
Constructor Summary | |
---|---|
FieldReference()
Constructor |
Method Summary | |
---|---|
static void |
checkReferences(java.util.List fieldReferences,
CompareCallback compareCallback,
java.lang.Object value,
Group group)
Check the parsed value against the referenced fields |
int |
getCompare()
|
static int |
getCompareType(java.lang.String key)
Map the comparison strings to their numeric counterparts |
java.lang.String |
getFieldName()
|
java.lang.String |
getMessage()
|
void |
setCompare(int compare)
|
void |
setFieldName(java.lang.String fieldName)
|
void |
setMessage(java.lang.String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
public static final java.lang.String RANGE_LT
public static final java.lang.String RANGE_GT
public static final java.lang.String RANGE_LTE
public static final java.lang.String RANGE_GTE
public static final int COMPARE_LT
public static final int COMPARE_GT
public static final int COMPARE_LTE
public static final int COMPARE_GTE
Constructor Detail |
---|
public FieldReference()
Method Detail |
---|
public int getCompare()
public void setCompare(int compare)
compare
- the comparison type to setpublic java.lang.String getFieldName()
public void setFieldName(java.lang.String fieldName)
fieldName
- the field name to setpublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the message to setpublic static int getCompareType(java.lang.String key)
key
- the
public static void checkReferences(java.util.List fieldReferences, CompareCallback compareCallback, java.lang.Object value, Group group) throws ValidationException
fieldReferences
- List of field references to checkcompareCallback
- Callback to the actual compare operationvalue
- the parsed value of the related fieldgroup
- the group the related field belongs to
ValidationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |