public class ValidationContextImpl extends java.lang.Object implements ValidationContext
| Constructor and Description |
|---|
ValidationContextImpl(java.lang.String command,
Property property,
java.util.Map<java.lang.String,Property[]> properties,
BindContext ctx,
boolean valid) |
| Modifier and Type | Method and Description |
|---|---|
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
ValidationContext.setInvalid() will set this false. |
void |
setInvalid()
set invalid
|
public ValidationContextImpl(java.lang.String command,
Property property,
java.util.Map<java.lang.String,Property[]> properties,
BindContext ctx,
boolean valid)
public BindContext getBindContext()
getBindContext in interface ValidationContextpublic java.lang.String getCommand()
ValidationContextgetCommand in interface ValidationContextpublic java.util.Map<java.lang.String,Property[]> getProperties()
ValidationContextgetProperties in interface ValidationContextpublic Property[] getProperties(java.lang.String name)
ValidationContextgetProperties in interface ValidationContextname - the property namepublic java.util.Map<java.lang.String,Property> getProperties(java.lang.Object base)
ValidationContext
Map beanProps = ctx.getProperties(ctx.getProperty().getBase());
Map formProps = ctx.getProperties(ctx.getProperty().getValue());
getProperties in interface ValidationContextbase - the base object of propertiespublic java.lang.Object getValidatorArg(java.lang.String key)
ValidationContextgetBindContext().getValidatorArg()getValidatorArg in interface ValidationContextkey - the key to the value.public Property getProperty()
ValidationContextgetProperty in interface ValidationContextpublic boolean isValid()
ValidationContextValidationContext.setInvalid() will set this false.isValid in interface ValidationContextValidator called ValidationContext.setInvalid(). Note, default is true.public boolean isLocalValid()
ValidationContextisLocalValid in interface ValidationContextValidator called ValidationContext.setInvalid(), default is true.public void setInvalid()
ValidationContextsetInvalid in interface ValidationContextCopyright © 2005-2011 Potix Corporation. All Rights Reserved.