Module io.helidon.builder.config
Package io.helidon.builder.config.spi
Interface ConfigBeanBuilderValidator.ValidationRound
- All Superinterfaces:
AttributeVisitor<Object>
- Enclosing interface:
ConfigBeanBuilderValidator<CBB>
Represents a single round of validation. A single round of validation will iterate over each attributes of the
config bean, calling
validate(String, Supplier, Class, java.util.Map) for each attribute.-
Method Summary
Modifier and TypeMethodDescriptionfinish(boolean throwIfErrors) Finishes the validation round, and will optionally throw a runtime exception if any error issues were found.default booleanReturns true if any errors were found.default booleanReturns true if there were any issues found including warnings or errors.booleanReturns true if the validation round is completed.issues()All the issues found.Performs a validation for a single attribute.default voidvisit(String attributeName, Supplier<Object> valueSupplier, Map<String, Object> meta, Object userDefinedCtx, Class<?> cbType, Class<?>... ignored) Visits the attribute named 'attrName'.
-
Method Details
-
issues
All the issues found.- Returns:
- all issues found
-
hasIssues
default boolean hasIssues()Returns true if there were any issues found including warnings or errors.- Returns:
- true if any issues were found
-
hasErrors
default boolean hasErrors()Returns true if any errors were found.- Returns:
- true if any issues were found of type
ConfigBeanBuilderValidator.Severity.ERROR
-
isCompleted
boolean isCompleted()Returns true if the validation round is completed.- Returns:
- true if the validation round is completed
- See Also:
-
validate
ConfigBeanBuilderValidator.ValidationRound validate(String attributeName, Supplier<?> valueSupplier, Class<?> cbType, Map<String, Object> meta) Performs a validation for a single attribute.- Parameters:
attributeName- the attribute name being validatedvalueSupplier- the value supplier for the attributecbType- the attribute typemeta- the meta attributes for this attribute type- Returns:
- the validation round continuation as a fluent-builder
-
visit
default void visit(String attributeName, Supplier<Object> valueSupplier, Map<String, Object> meta, Object userDefinedCtx, Class<?> cbType, Class<?>... ignored) Description copied from interface:AttributeVisitorVisits the attribute named 'attrName'.- Specified by:
visitin interfaceAttributeVisitor<Object>- Parameters:
attributeName- the attribute namevalueSupplier- the attribute value suppliermeta- the meta information for the attributeuserDefinedCtx- a user defined context that can be used for holding an object of your choosingcbType- the type of the attributeignored- the type arguments (if type is a parameterized / generic type)
-
finish
Finishes the validation round, and will optionally throw a runtime exception if any error issues were found.- Parameters:
throwIfErrors- flag to indicate whether an exception should be raised if any errors were found- Returns:
- the fluent builder for this round
- Throws:
IllegalStateException- if there were any validation errors in the round
-