org.keel.services.model
Interface ModelValidator
- All Known Implementing Classes:
- DefaultModelValidator
- public interface ModelValidator
A component that validates a ModelRequest before the specified Model actually executes.
- Author:
- Michael Nash
| Field Summary |
static java.lang.String |
ROLE
Role string used to look up this component |
ROLE
public static final java.lang.String ROLE
-
Role string used to look up this component
- See Also:
- Constant Field Values
validate
public Command validate(ModelRequest req,
Model theModel)
throws ConfigurationException,
ModelException
-
Validate the request parameters about to be passed to the specified model. This method is called *before* the model is executed.
-
- Parameters:
req - The ModelRequest with the parameters to be validated
theModel - The model about to be executed
- Returns:
- Null if all validations are acceptable, or a Command indicating a re-direct to some other Model. This method can also return null if some validations fail, but if a redirect is not requested the errors are simply accumulated with the ModelRequest.
- Throws:
ConfigurationException - In the event the configuration for this validator is incorrect
ModelException - If there is something seriously wrong with the ModelRequest or the Model itself
Please see keelframework.org for information about new Keel releases.