public class ValidationContext
extends java.lang.Object
Constructor | Description |
---|---|
ValidationContext() |
Modifier and Type | Method | Description |
---|---|---|
void |
addID(java.lang.String id) |
Adds current ID (as seen during (un)marshalling) to the ID cache.
|
protected void |
addValidated(java.lang.Object object) |
Adds the specified object to the cache of already validated objects.
|
boolean |
checkIdRef(java.lang.String id) |
Checks an ID Reference, returning true if the provided ID is known.
|
void |
cleanup() |
Life-cycle method for proper 'shutdown operations'.
|
XMLClassDescriptorResolver |
getClassDescriptorResolver() |
Returns the ClassDescriptorResolver to use during validation.
|
InternalContext |
getInternalContext() |
To get the
AbstractInternalContext to use. |
java.util.Set |
getUnresolvedIdRefs() |
Returns the Set of unresolved ID references.
|
boolean |
isFailFast() |
Returns true if the validation process should fail upon first error
encountered, otherwise the validation processs will attempt to validate
as much as possible (even after the first error is encountered) and
collect as many errors before either returning (no errors) or throwing a
validationException containing the list of errors.
|
protected boolean |
isValidated(java.lang.Object object) |
Checks whether an object has already been validated.
|
protected void |
removeValidated(java.lang.Object object) |
Removes the specified object from the cache of already validated objects.
|
void |
setFailFast(boolean failFast) |
Sets the fail-fast flag.
|
void |
setInternalContext(InternalContext internalContext) |
To set which
AbstractInternalContext should be used. |
public InternalContext getInternalContext()
AbstractInternalContext
to use.AbstractInternalContext
?to usepublic void setInternalContext(InternalContext internalContext)
AbstractInternalContext
should be used.internalContext
- the AbstractInternalContext
to usepublic XMLClassDescriptorResolver getClassDescriptorResolver()
public boolean isFailFast()
NOTE: DISABLING OF FAIL-FAST IS NOT YET ENABLED.
public void setFailFast(boolean failFast)
NOTE: DISABLING FAIL-FAST IS NOT YET ENABLED.
failFast
- a boolean that when true enables fail-fast validation,
otherwise the validator will attempt to validate as much as it can
reporting as many errors as possible before returning.protected boolean isValidated(java.lang.Object object)
object
- The object for which the check should be performedprotected void addValidated(java.lang.Object object)
object
- Object about to be validated.protected void removeValidated(java.lang.Object object)
object
- The object to be removed from the cache.public void addID(java.lang.String id) throws ValidationException
id
- The current IDValidationException
- If an ID is used more than once.getUnresolvedIdRefs()
public boolean checkIdRef(java.lang.String id)
id
- The ID to check.getUnresolvedIdRefs()
public java.util.Set getUnresolvedIdRefs()
public void cleanup()
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com