|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.impl.BaseConfiguredValidator
org.iscreen.ognl.OgnlConfiguredValidator
public class OgnlConfiguredValidator
A special validator wrapper that wraps a Validator and the configuration associated with it.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_FROM
|
static java.lang.String |
DEFAULT_TO
|
Fields inherited from class org.iscreen.impl.BaseConfiguredValidator |
---|
containingService, declared, doc, failFastFlag, id, ifExp, label, mappings, name, parsedDoc, ref, staticProperties, validator, validatorClass |
Constructor Summary | |
---|---|
OgnlConfiguredValidator()
Default constructor. |
Method Summary | |
---|---|
void |
addMapping(java.lang.String from,
java.lang.String to)
Adds a mapping for mapping the object being validated to the beanToValidate object (that the Validator created). |
void |
addStaticProperty(java.lang.String property,
java.lang.Object obj)
Adds a "static" property to set on the underlying Validator. |
protected java.lang.String |
convertDoc(java.lang.Object obj,
java.lang.String unconvertedDoc)
Convert the documentation text using the embedded markers. |
protected void |
executeMappings(java.lang.Object from,
java.lang.Object to)
Maps the appropriate properties from one object to another. |
Validator |
getConfiguredValidator()
Creates the Validator and configures it. |
protected static OgnlObjectMapping |
getDefaultMapping()
Create a default mapping so that if no mapping is defined in configuration, a default mapping can be used. |
protected java.util.Collection |
getFields()
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. |
protected boolean |
shouldExecute(java.lang.Object obj)
Determines whether this validator should be executed or not. |
Methods inherited from class org.iscreen.impl.BaseConfiguredValidator |
---|
getDoc, getFieldsTrace, getId, getIfExpression, getLabel, getMappings, getName, getRawDoc, getServiceId, getStaticProperties, getValidatorClass, isDeclared, isFailFast, setClassName, setDoc, setFailFast, setId, setIfExpression, setLabel, setLabel, setName, setRef, setValidationService, signalDeclared, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_TO
public static final java.lang.String DEFAULT_FROM
Constructor Detail |
---|
public OgnlConfiguredValidator()
Method Detail |
---|
protected void executeMappings(java.lang.Object from, java.lang.Object to)
executeMappings
in class BaseConfiguredValidator
from
- The object to map from.to
- The object to map to.public void addMapping(java.lang.String from, java.lang.String to)
addMapping
in class BaseConfiguredValidator
from
- The OGNL from expression (getter)to
- The OGNL to expression (setter)public void addStaticProperty(java.lang.String property, java.lang.Object obj)
addStaticProperty
in class BaseConfiguredValidator
property
- The OGNL expression to set a valueobj
- The value to set, once, on the Validator to configure it.protected static OgnlObjectMapping getDefaultMapping()
public Validator getConfiguredValidator()
getConfiguredValidator
in class BaseConfiguredValidator
protected java.util.Collection getFields()
getFields
in class BaseConfiguredValidator
protected java.lang.String convertDoc(java.lang.Object obj, java.lang.String unconvertedDoc)
BaseConfiguredValidator
convertDoc
in class BaseConfiguredValidator
obj
- The context bean (root) for converting the doc.unconvertedDoc
- The raw documentation text.
protected boolean shouldExecute(java.lang.Object obj)
BaseConfiguredValidator
shouldExecute
in class BaseConfiguredValidator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |