|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.BeanValidationContext<ConstraintValidationListener<T>>
org.apache.bval.jsr303.GroupValidationContextImpl<T>
final class GroupValidationContextImpl<T>
Description: instance per validation process, not thread-safe
Field Summary |
---|
Fields inherited from class org.apache.bval.BeanValidationContext |
---|
validatedObjects |
Constructor Summary | |
---|---|
GroupValidationContextImpl(ConstraintValidationListener<T> listener,
MessageInterpolator aMessageResolver,
TraversableResolver traversableResolver,
MetaBean rootMetaBean)
Create a new GroupValidationContextImpl instance. |
Method Summary | |
---|---|
boolean |
collectValidated()
Avoid recursion by recording the current state of this context as having been validated. |
boolean |
collectValidated(ConstraintValidator<?,?> constraint)
Accumulate a validated constraint. |
ConstraintDescriptor<?> |
getConstraintDescriptor()
|
ConstraintValidation<?> |
getConstraintValidation()
Get the ConstraintValidation . |
Group |
getCurrentGroup()
Get the current Group . |
Class<?> |
getCurrentOwner()
Get the current owning class. |
Groups |
getGroups()
Get the groups of this GroupValidationContext . |
MessageInterpolator |
getMessageResolver()
Get the message resolver. |
PathImpl |
getPropertyPath()
Get the property path. |
MetaBean |
getRootMetaBean()
Get the root MetaBean . |
TraversableResolver |
getTraversableResolver()
Get the TraversableResolver . |
Object |
getValidatedValue()
Get the value being validated. |
void |
moveDown(MetaProperty prop,
AccessStrategy access)
Step deeper into association at 'prop' |
void |
moveUp(Object bean,
MetaBean metaBean)
Step out from a validation of associated objects. |
void |
resetValidatedConstraints()
Reset the validated constraints. |
void |
setConstraintValidation(ConstraintValidation<?> constraint)
Set the ConstraintValidation . |
void |
setCurrentGroup(Group currentGroup)
Set the current Group . |
void |
setCurrentIndex(Integer index)
Set the index of the object currently validated into the context. |
void |
setCurrentKey(Object key)
set the key of the object in a map currently validated into the context. |
void |
setCurrentOwner(Class<?> currentOwner)
Set the current owning class. |
void |
setGroups(Groups groups)
Set the Groups. |
Methods inherited from class org.apache.bval.BeanValidationContext |
---|
getAccess, getBean, getListener, getMeta, getMetaBean, getMetaProperty, getPropertyName, getPropertyValue, getPropertyValue, isFixed, isValidated, resetValidated, setBean, setBean, setFixed, setFixedValue, setListener, setMetaBean, setMetaProperty, setPropertyValue, toString, unknownValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.bval.jsr303.GroupValidationContext |
---|
setFixedValue |
Methods inherited from interface org.apache.bval.model.ValidationContext |
---|
getAccess, getBean, getListener, getMetaBean, getMetaProperty, getPropertyName, getPropertyValue, getPropertyValue, setBean, setBean, setMetaBean, setMetaProperty |
Constructor Detail |
---|
public GroupValidationContextImpl(ConstraintValidationListener<T> listener, MessageInterpolator aMessageResolver, TraversableResolver traversableResolver, MetaBean rootMetaBean)
listener
- aMessageResolver
- traversableResolver
- rootMetaBean
- Method Detail |
---|
public void setCurrentIndex(Integer index)
setCurrentIndex
in interface ValidationContext<ConstraintValidationListener<T>>
setCurrentIndex
in class BeanValidationContext<ConstraintValidationListener<T>>
public void setCurrentKey(Object key)
setCurrentKey
in interface ValidationContext<ConstraintValidationListener<T>>
setCurrentKey
in class BeanValidationContext<ConstraintValidationListener<T>>
public void moveDown(MetaProperty prop, AccessStrategy access)
moveDown
in interface ValidationContext<ConstraintValidationListener<T>>
moveDown
in class BeanValidationContext<ConstraintValidationListener<T>>
public void moveUp(Object bean, MetaBean metaBean)
moveUp
in interface ValidationContext<ConstraintValidationListener<T>>
moveUp
in class BeanValidationContext<ConstraintValidationListener<T>>
public boolean collectValidated()
collectValidated
in interface ValidationContext<ConstraintValidationListener<T>>
collectValidated
in class BeanValidationContext<ConstraintValidationListener<T>>
public boolean collectValidated(ConstraintValidator<?,?> constraint)
collectValidated
in interface GroupValidationContext<T>
public void resetValidatedConstraints()
public PathImpl getPropertyPath()
getPropertyPath
in interface GroupValidationContext<T>
public MetaBean getRootMetaBean()
MetaBean
.
getRootMetaBean
in interface GroupValidationContext<T>
MetaBean
public void setGroups(Groups groups)
groups
- public Groups getGroups()
GroupValidationContext
.
getGroups
in interface GroupValidationContext<T>
public Group getCurrentGroup()
Group
.
getCurrentGroup
in interface GroupValidationContext<T>
public void setCurrentGroup(Group currentGroup)
Group
.
setCurrentGroup
in interface GroupValidationContext<T>
currentGroup
- to setpublic void setConstraintValidation(ConstraintValidation<?> constraint)
ConstraintValidation
.
setConstraintValidation
in interface GroupValidationContext<T>
constraint
- to setpublic ConstraintValidation<?> getConstraintValidation()
ConstraintValidation
.
getConstraintValidation
in interface GroupValidationContext<T>
ConstraintValidation
public ConstraintDescriptor<?> getConstraintDescriptor()
getConstraintDescriptor
in interface MessageInterpolator.Context
public Object getValidatedValue()
getValidatedValue
in interface MessageInterpolator.Context
getValidatedValue
in interface GroupValidationContext<T>
public MessageInterpolator getMessageResolver()
getMessageResolver
in interface GroupValidationContext<T>
MessageInterpolator
public TraversableResolver getTraversableResolver()
TraversableResolver
.
getTraversableResolver
in interface GroupValidationContext<T>
TraversableResolver
public Class<?> getCurrentOwner()
getCurrentOwner
in interface GroupValidationContext<T>
public void setCurrentOwner(Class<?> currentOwner)
setCurrentOwner
in interface GroupValidationContext<T>
currentOwner
- to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |