|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iscreen.impl.DefaultValidatorContext
public class DefaultValidatorContext
This is the default implementation of the ValidatorContext that's passed to Validators during validation.
| Field Summary | |
|---|---|
protected ContextBean |
contextBean
|
protected java.util.List |
failures
|
protected java.util.Locale |
locale
|
protected ValidationService |
service
|
protected ValidationTrace |
trace
|
protected ValidatorWrapper |
validator
|
| Constructor Summary | |
|---|---|
DefaultValidatorContext(ValidationService theService,
ContextBean theRoot,
java.util.Locale theLocale)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addRawFailures(java.util.List failureList,
ValidationService service)
Adds "raw" failures (which is a List of ValidationFailure objects) to the existing set of failures. |
int |
getCount()
Calculates the failure counts. |
java.util.List |
getFailures()
Retrieves a List of the current failures within this context. |
java.util.Locale |
getLocale()
Gets the current locale being used for this validation. |
ValidationService |
getValidationService()
Retrieves the validation service this context is being used with. |
java.lang.String |
getValidatorName()
Used to obtain the name of the validator that is currently being used. This is handy for tracing/logging. |
void |
reportFailure(FailureMessage messageObject)
Called to report a validation failure. |
void |
reportFailure(FailureMessage messageObject,
java.lang.Object failureObject)
Called to report a validation failure. |
void |
setValidationTrace(ValidationTrace theTrace)
Sets the trace so that the context can use it for reporting failures. |
void |
setValidator(ValidatorWrapper wrapper)
Sets the ValidatorWrapper that the context needs to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List failures
protected ContextBean contextBean
protected java.util.Locale locale
protected ValidatorWrapper validator
protected ValidationService service
protected ValidationTrace trace
| Constructor Detail |
|---|
public DefaultValidatorContext(ValidationService theService,
ContextBean theRoot,
java.util.Locale theLocale)
| Method Detail |
|---|
public void reportFailure(FailureMessage messageObject)
ValidatorContext
reportFailure in interface ValidatorContextmessageObject - The message failure object representing the failure.
public void reportFailure(FailureMessage messageObject,
java.lang.Object failureObject)
ValidatorContext
reportFailure in interface ValidatorContextmessageObject - The message failure object representing the failure.failureObject - A Validator-specific failure object to be made
accessible to the message via the OGNL root.public java.util.Locale getLocale()
ValidatorContext
getLocale in interface ValidatorContextpublic ValidationService getValidationService()
ValidatorContext
getValidationService in interface ValidatorContextpublic java.util.List getFailures()
getFailures in interface InternalValidatorContext
public void addRawFailures(java.util.List failureList,
ValidationService service)
addRawFailures in interface InternalValidatorContextfailureList - The List of ValidationFailures to add to this context.service - The validation service representing the failures.public int getCount()
getCount in interface InternalValidatorContextpublic void setValidator(ValidatorWrapper wrapper)
setValidator in interface InternalValidatorContextwrapper - The ValidatorWrapper to use.public void setValidationTrace(ValidationTrace theTrace)
InternalValidatorContext
setValidationTrace in interface InternalValidatorContexttheTrace - The ValidationTrace instace.public java.lang.String getValidatorName()
getValidatorName in interface ValidatorContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||