|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.iscreen.impl.ValidationServiceValidator
public abstract class ValidationServiceValidator
This is a special ValidatorWrapper that forwards validation to a different Validation Set.
Field Summary | |
---|---|
protected boolean |
failFastFlag
|
protected java.lang.String |
ifExp
|
protected java.lang.String |
iterateExp
|
protected java.lang.String |
mapExp
|
protected java.lang.String |
name
|
protected ValidationService |
parentService
|
protected DefaultValidationService |
wrappedService
|
Constructor Summary | |
---|---|
ValidationServiceValidator(DefaultValidationService service,
ValidationService theParentService)
Default constructor. |
Method Summary | |
---|---|
protected InternalValidatorContext |
createNewContext(ContextBean newContextBean,
java.util.Locale newLocale,
InternalValidatorContext oldContext)
Constructs a new context for the validation set being called. |
DocumentationIterator |
getDoc()
Called to retrieve the documentation for the validator. |
java.lang.String |
getIfExpression()
|
java.lang.String |
getIterateExpression()
|
java.lang.String |
getMapExpression()
|
java.lang.String |
getName()
Called to retrieve the "name" of the validator. |
boolean |
isFailFast()
|
protected abstract java.lang.Object |
mapObject(InternalValidatorContext context,
ContextBean contextBean,
java.lang.Object obj)
Handle the mapping of the object being validated to the property that will be validated (may be the object, itself). |
void |
setFailFast(boolean flag)
|
void |
setIfExpression(java.lang.String exp)
|
void |
setIterateExpression(java.lang.String exp)
|
void |
setMapExpression(java.lang.String exp)
|
void |
setName(java.lang.String theName)
|
protected abstract boolean |
shouldExecute(InternalValidatorContext context,
ContextBean contextBean,
java.lang.Object obj)
Determines whether the inclusion/call to the validation set should occur. |
protected abstract boolean |
shouldIterate(InternalValidatorContext context,
ContextBean contextBean,
java.lang.Object obj)
Determines whether we're iterating over the mapped object. |
boolean |
validate(InternalValidatorContext context,
ContextBean contextBean,
ValidationTrace trace,
java.lang.Object obj)
Called to have the wrapper validate the passed object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DefaultValidationService wrappedService
protected ValidationService parentService
protected java.lang.String ifExp
protected java.lang.String iterateExp
protected java.lang.String mapExp
protected boolean failFastFlag
protected java.lang.String name
Constructor Detail |
---|
public ValidationServiceValidator(DefaultValidationService service, ValidationService theParentService)
service
- The validation service this validator representstheParentService
- The parent validation serviceMethod Detail |
---|
public boolean validate(InternalValidatorContext context, ContextBean contextBean, ValidationTrace trace, java.lang.Object obj)
ValidatorWrapper
validate
in interface ValidatorWrapper
context
- The validation context to pass on to the contained
validator.contextBean
- The OGNL root, to be updated as appropriate.trace
- The validation trace to track what calls what.obj
- The object to be validated.
public void setIfExpression(java.lang.String exp)
public java.lang.String getIfExpression()
public void setIterateExpression(java.lang.String exp)
public java.lang.String getIterateExpression()
public void setMapExpression(java.lang.String exp)
public java.lang.String getMapExpression()
public void setFailFast(boolean flag)
public boolean isFailFast()
public void setName(java.lang.String theName)
public java.lang.String getName()
ValidatorWrapper
getName
in interface ValidatorWrapper
public DocumentationIterator getDoc()
getDoc
in interface ValidatorWrapper
protected abstract boolean shouldIterate(InternalValidatorContext context, ContextBean contextBean, java.lang.Object obj)
context
- The ValidatorContextcontextBean
- The ContextBeanobj
- The object being validated.
protected abstract boolean shouldExecute(InternalValidatorContext context, ContextBean contextBean, java.lang.Object obj)
context
- The ValidatorContextcontextBean
- The ContextBeanobj
- The object being validated.
protected abstract java.lang.Object mapObject(InternalValidatorContext context, ContextBean contextBean, java.lang.Object obj)
context
- The ValidatorContextcontextBean
- The ContextBeanobj
- The object being validated.
protected InternalValidatorContext createNewContext(ContextBean newContextBean, java.util.Locale newLocale, InternalValidatorContext oldContext)
newContextBean
- The new ContextBean created for the validation set.newLocale
- The new Locale for the validation set.oldContext
- The old ValidatorContext from the current validation set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |