| java.lang.Object org.iscreen.impl.BaseConfiguredValidator org.iscreen.ognl.OgnlConfiguredValidator
OgnlConfiguredValidator | public class OgnlConfiguredValidator extends BaseConfiguredValidator (Code) | | A special validator wrapper that wraps a Validator and the
configuration associated with it.
author: Shellman, Dan |
OgnlConfiguredValidator | public OgnlConfiguredValidator()(Code) | | Default constructor.
|
addMapping | public void addMapping(String from, String to)(Code) | | Adds a mapping for mapping the object being validated to the
beanToValidate object (that the Validator created).
Parameters: from - The OGNL from expression (getter) Parameters: to - The OGNL to expression (setter) |
addStaticProperty | public void addStaticProperty(String property, Object obj)(Code) | | Adds a "static" property to set on the underlying Validator. A
"static" property is really an OGNL expression that will set
some value on the Validator once (such as a constraint, service,
or failure message).
For failures, the object type should be an OgnlMessage. For
a constraint or service, any object type is fine (as long as it
maps to the underlying Validator property).
Parameters: property - The OGNL expression to set a value Parameters: obj - The value to set, once, on the Validator to configure it. |
executeMappings | protected void executeMappings(Object from, Object to)(Code) | | Maps the appropriate properties from one object to another.
Parameters: from - The object to map from. Parameters: to - The object to map to. |
getConfiguredValidator | public Validator getConfiguredValidator()(Code) | | Creates the Validator and configures it. Multiple calls will NOT
construct a new Validator each call, but will return the same
instance created the first time.
Returns a created and configured Validator. |
getDefaultMapping | protected static OgnlObjectMapping getDefaultMapping()(Code) | | Create a default mapping so that if no mapping is defined in configuration,
a default mapping can be used.
Returns a default configured mapping. |
getFields | protected Collection getFields()(Code) | | Retrieves the Collection of fields (the 'getter' OGNL expressions)
that are used in mapping properties from the JavaBean/Object being
validated to the validation bean.
Returns the Collection of fields (the 'getter' OGNL expressions). |
|
|