java.lang.Object
net.pincette.jes.util.Validation
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.pincette.jes.Reducer
The validator is generated fromsource
, which can be a filename or a string that starts with "resource:".static net.pincette.jes.Reducer
validator
(Function<JsonObject, JsonArray> validator) The validator can expect the_state
field to be added to the command.
-
Method Details
-
validator
The validator is generated fromsource
, which can be a filename or a string that starts with "resource:". In the latter case the specification will be loaded as a resource from the class path. The validator can expect the_state
field to be added to the command. This way validation expressions can be written that take into account the current state of the aggregate instance.- Parameters:
source
- the source of the validation specification.validators
- a validator management object.- Returns:
- The generated validation reducer.
- Since:
- 1.3
- See Also:
-
validator
The validator can expect the_state
field to be added to the command. This way validation expressions can be written that take into account the current state of the aggregate instance.- Parameters:
validator
- the validator.- Returns:
- The generated validation reducer.
- Since:
- 1.3.2
- See Also:
-