public class RecordValidator extends Object
Constructor and Description |
---|
RecordValidator(ExecutionContext ctx)
Creates a record validator.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
executeConstraint(com.whitestein.lsps.model.validation.ConstraintModel constraint,
RecordHolder record,
MapHolder validationContext,
CollectionHolder tags)
Executes a constraint type associated with a given constraint.
|
Collection<com.whitestein.lsps.model.validation.ConstraintModel> |
getConstraints(RecordHolder record,
Property property)
Returns a collection of constraints defined on the given record (property).
|
protected ExecutionContext |
getExecutionContext()
Returns the execution context.
|
protected Object |
getValidatedValue(com.whitestein.lsps.model.validation.ConstraintModel constraint,
RecordHolder record) |
Set<QID> |
resolveValidationTags(Collection<QID> tags)
Resolves a given collection of validation tags.
|
Set<QID> |
resolveValidationTags(CollectionHolder tags)
Resolves a given collection of validation tags.
|
List<RecordHolder> |
validate(RecordHolder record,
Property property,
CollectionHolder tags,
MapHolder context)
Validates a given record.
|
Collection<RecordHolder> |
validateConstraint(com.whitestein.lsps.model.validation.ConstraintModel constraint,
RecordHolder record,
MapHolder validationContext,
CollectionHolder tags)
Validates a given record against a given constraint.
|
public RecordValidator(ExecutionContext ctx)
ctx
- protected ExecutionContext getExecutionContext()
public List<RecordHolder> validate(RecordHolder record, Property property, CollectionHolder tags, MapHolder context) throws ErrorException
record
- property
- tags
- context
- ErrorException
public Collection<com.whitestein.lsps.model.validation.ConstraintModel> getConstraints(RecordHolder record, Property property)
record
- property
- public Set<QID> resolveValidationTags(CollectionHolder tags)
tags
- public Set<QID> resolveValidationTags(Collection<QID> tags)
tags
- public Collection<RecordHolder> validateConstraint(com.whitestein.lsps.model.validation.ConstraintModel constraint, RecordHolder record, MapHolder validationContext, CollectionHolder tags) throws ErrorException
constraint
- record
- validationContext
- tags
- ErrorException
protected Object getValidatedValue(com.whitestein.lsps.model.validation.ConstraintModel constraint, RecordHolder record)
protected Object executeConstraint(com.whitestein.lsps.model.validation.ConstraintModel constraint, RecordHolder record, MapHolder validationContext, CollectionHolder tags) throws ErrorException
constraint
- record
- validationContext
- tags
- ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.