com.google.code.validationframework.experimental.builder.context.simplevalidator
Class ValidatorContext<D,O>
java.lang.Object
com.google.code.validationframework.experimental.builder.context.simplevalidator.ValidatorContext<D,O>
- Type Parameters:
D - Type of data to be validated.
It can be, for instance, the type of data handled by a component, or the
type of the component itself.O - Type of validation result.
It can be, for instance, an enumeration or just a boolean.
public class ValidatorContext<D,O>
- extends Object
Context to add more result handlers and to create the validator.
|
Constructor Summary |
ValidatorContext(List<com.google.code.validationframework.api.trigger.Trigger> registeredTriggers,
List<com.google.code.validationframework.api.dataprovider.DataProvider<D>> registeredDataProviders,
List<com.google.code.validationframework.api.rule.Rule<D,O>> registeredRules,
List<com.google.code.validationframework.api.resulthandler.ResultHandler<O>> registeredResultHandlers)
|
|
Method Summary |
com.google.code.validationframework.base.validator.DefaultSimpleValidator<D,O> |
build()
Creates the validator and makes all the connections. |
ValidatorContext<D,O> |
handleWith(Collection<com.google.code.validationframework.api.resulthandler.ResultHandler<O>> resultHandlers)
|
ValidatorContext<D,O> |
handleWith(com.google.code.validationframework.api.resulthandler.ResultHandler<O>... resultHandlers)
Adds more result handlers to the validator. |
ValidatorContext<D,O> |
handleWith(com.google.code.validationframework.api.resulthandler.ResultHandler<O> resultHandler)
|
ValidatorContext<D,O> |
read(Class<? extends com.google.code.validationframework.api.resulthandler.ResultHandler<O>> resultHandlerClass)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidatorContext
public ValidatorContext(List<com.google.code.validationframework.api.trigger.Trigger> registeredTriggers,
List<com.google.code.validationframework.api.dataprovider.DataProvider<D>> registeredDataProviders,
List<com.google.code.validationframework.api.rule.Rule<D,O>> registeredRules,
List<com.google.code.validationframework.api.resulthandler.ResultHandler<O>> registeredResultHandlers)
read
public ValidatorContext<D,O> read(Class<? extends com.google.code.validationframework.api.resulthandler.ResultHandler<O>> resultHandlerClass)
handleWith
public ValidatorContext<D,O> handleWith(com.google.code.validationframework.api.resulthandler.ResultHandler<O> resultHandler)
handleWith
public ValidatorContext<D,O> handleWith(com.google.code.validationframework.api.resulthandler.ResultHandler<O>... resultHandlers)
- Adds more result handlers to the validator.
- Parameters:
resultHandlers - Result handlers to be added.
- Returns:
- Same validator context.
handleWith
public ValidatorContext<D,O> handleWith(Collection<com.google.code.validationframework.api.resulthandler.ResultHandler<O>> resultHandlers)
build
public com.google.code.validationframework.base.validator.DefaultSimpleValidator<D,O> build()
- Creates the validator and makes all the connections.
- Returns:
- Newly created and configured validator.
Copyright © 2013. All Rights Reserved.