org.springframework.webflow.validation
Class BeanValidationHintResolver
java.lang.Object
org.springframework.webflow.validation.BeanValidationHintResolver
- All Implemented Interfaces:
- ValidationHintResolver
public class BeanValidationHintResolver
- extends java.lang.Object
- implements ValidationHintResolver
A JSR-303 (Bean Validation) implementation of ValidationHintResolver
that resolves String-based hints to a Class<?>
array.
- Since:
- 2.4
- Author:
- Rossen Stoyanchev
Method Summary |
protected java.lang.Class<?> |
handleUnresolvedHint(java.lang.Object model,
java.lang.String flowId,
java.lang.String stateId,
java.lang.String hint)
Invoked when a hint could not be resolved. |
java.lang.Class<?>[] |
resolveValidationHints(java.lang.Object model,
java.lang.String flowId,
java.lang.String stateId,
java.lang.String[] hints)
Resolve each hint as a fully qualified class name or the name of an inner
Class in the model type or the model or its parent types. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanValidationHintResolver
public BeanValidationHintResolver()
resolveValidationHints
public java.lang.Class<?>[] resolveValidationHints(java.lang.Object model,
java.lang.String flowId,
java.lang.String stateId,
java.lang.String[] hints)
throws FlowExecutionException
- Resolve each hint as a fully qualified class name or the name of an inner
Class
in the model type or the model or its parent types.
- Specified by:
resolveValidationHints
in interface ValidationHintResolver
- Parameters:
model
- the model objectflowId
- the current flow idstateId
- the current view state idhints
- the hints to resolve
- Returns:
- the resolved hints or
null
- Throws:
FlowExecutionException
- if a hint is unresolved- See Also:
handleUnresolvedHint(Object, String, String, String)
handleUnresolvedHint
protected java.lang.Class<?> handleUnresolvedHint(java.lang.Object model,
java.lang.String flowId,
java.lang.String stateId,
java.lang.String hint)
throws FlowExecutionException
- Invoked when a hint could not be resolved. This implementation raises a
FlowExecutionException
.
- Parameters:
model
- the model object that will be validated using the hintsflowId
- the current flow idstateId
- the current state idhint
- the hint
- Returns:
- the resolved hint
- Throws:
FlowExecutionException