|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fulcrum.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 String |
RANGE_GT
Rule name for ">" comparison |
static String |
RANGE_GTE
Rule name for ">=" comparison |
static String |
RANGE_LT
Rule name for "<" comparison |
static String |
RANGE_LTE
Rule name for "<=" comparison |
| Constructor Summary | |
|---|---|
FieldReference()
Constructor |
|
| Method Summary | |
|---|---|
static void |
checkReferences(List fieldReferences,
CompareCallback compareCallback,
Object value,
Group group)
Check the parsed value against the referenced fields |
int |
getCompare()
|
static int |
getCompareType(String key)
Map the comparison strings to their numeric counterparts |
String |
getFieldName()
|
String |
getMessage()
|
void |
setCompare(int compare)
|
void |
setFieldName(String fieldName)
|
void |
setMessage(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 String RANGE_LT
public static final String RANGE_GT
public static final String RANGE_LTE
public static final 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 String getFieldName()
public void setFieldName(String fieldName)
fieldName - the field name to setpublic String getMessage()
public void setMessage(String message)
message - the message to setpublic static int getCompareType(String key)
key - the string representation of a comparison operator
public static void checkReferences(List fieldReferences,
CompareCallback compareCallback,
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 | |||||||||