|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValidationContext
The context for validation
Method Summary | |
---|---|
BindContext |
getBindContext()
|
java.lang.String |
getCommand()
get the command that trigger the validation |
java.util.Map<java.lang.String,Property[]> |
getProperties()
get dependent properties that need to be validated. |
java.util.Map<java.lang.String,Property> |
getProperties(java.lang.Object base)
get dependent properties by a base object. |
Property[] |
getProperties(java.lang.String name)
get dependent properties by the property name. |
Property |
getProperty()
get the main property that need to be validated. |
java.lang.Object |
getValidatorArg(java.lang.String key)
Returns validator arg value of the given key This is a shortcut of getBindContext().getValidatorArg() |
boolean |
isLocalValid()
Checks status of local validation context valid or not, it only relates to one validator. |
boolean |
isValid()
Checks status of validation context valid or not, it is a global status of same command, any validator of this validation phase call setInvalid() will set this false. |
void |
setInvalid()
set invalid |
Method Detail |
---|
boolean isValid()
setInvalid()
will set this false.
Validator
called setInvalid()
. Note, default is true.boolean isLocalValid()
Validator
called setInvalid()
, default is true.void setInvalid()
java.lang.String getCommand()
java.util.Map<java.lang.String,Property[]> getProperties()
Property[] getProperties(java.lang.String name)
name
- the property name
java.util.Map<java.lang.String,Property> getProperties(java.lang.Object base)
Map beanProps = ctx.getProperties(ctx.getProperty().getBase());
Map formProps = ctx.getProperties(ctx.getProperty().getValue());
base
- the base object of properties
java.lang.Object getValidatorArg(java.lang.String key)
getBindContext().getValidatorArg()
key
- the key to the value.
Property getProperty()
BindContext getBindContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |