Module dev.metaschema.core
Class ConstraintValidationFinding.Builder
java.lang.Object
dev.metaschema.core.model.constraint.ConstraintValidationFinding.Builder
- Enclosing class:
- ConstraintValidationFinding
Implements a builder pattern for creating constraint findings.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Generate the finding using the previously provided data.Use the provided cause for the validation finding.kind(IValidationFinding.Kind kind) Use the provided kind for the validation finding.Use the provided message for the validation finding.severity(IConstraint.Level severity) Use the provided severity for the validation finding.Use the provided subjects for the validation finding.Use the provided target for the validation finding.
-
Method Details
-
target
Use the provided target for the validation finding.- Parameters:
target- the finding target- Returns:
- this builder
-
message
Use the provided message for the validation finding.- Parameters:
message- the message target- Returns:
- this builder
-
subjects
@NonNull public ConstraintValidationFinding.Builder subjects(@NonNull List<? extends INodeItem> subjects) Use the provided subjects for the validation finding.- Parameters:
subjects- the finding subjects- Returns:
- this builder
-
cause
Use the provided cause for the validation finding.- Parameters:
cause- the finding cause- Returns:
- this builder
-
kind
Use the provided kind for the validation finding.- Parameters:
kind- the finding kind- Returns:
- this builder
-
severity
Use the provided severity for the validation finding.- Parameters:
severity- the finding severity- Returns:
- this builder
-
build
Generate the finding using the previously provided data.- Returns:
- a new finding
-