Class ValueAcceptanceCriteria.Builder
java.lang.Object
de.xima.fc.interfaces.workflow.value.ValueAcceptanceCriteria.Builder
- Enclosing class:
ValueAcceptanceCriteria
Builder for custom value acceptance criteria.
- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionAllows extraneous fields inrecordsthat are not defined in the record descriptor.allowExtraneousRecordFields(boolean allowExtraneousRecordFields) Controls whether extraneous fields inrecordsare allowed that are not defined in the record descriptor.Allows extraneous elements intuples, i.e. values at indices larger than the highest index defined in the tuple descriptor.allowExtraneousTupleElements(boolean allowExtraneousTupleElements) Controls whether extraneous elements intuplesare allowed, i.e. values at indices larger than the highest index defined in the tuple descriptor.Allows values forvoiddescriptors.allowExtraneousVoidValues(boolean allowExtraneousVoidValues) Whether to allow values forvoiddescriptors.Allows constant values inconstantsto mismatch the defined constant value.allowMismatchingConst(boolean allowMismatchingConst) Controls whether constant values inconstantsare allowed to mismatch the defined constant value.Allowsrecordsto have missing fields that are marked as required in the record descriptor.allowMissingRequiredRecordFields(boolean allowMissingRequiredRecordFields) Controls whetherrecordsare allowed to have missing fields that are marked as required in the record descriptor.Allowstuplesto have fewer elements than defined in the tuple descriptor.allowMissingTupleElements(boolean allowMissingTupleElements) Controls whethertuplesare allowed to have fewer elements than defined in the tuple descriptor.allowNonStringKeys(boolean allowNonStringKeys) build()Creates a new value acceptance criteria instance from the current builder state.Disables type coercion of values.enableLargeStringInteroperability(boolean enableLargeStringInteroperability) Whether to treatStringandLargeStringas equivalent types for the purpose of value acceptance.Enables type coercion of values.enableTypeCoercion(Boolean enableTypeCoercion) Whether to enable type coercion of values.Requires that each item inlistsmust conform to the defined item value descriptor.enforceListItemConformance(boolean enforceListItemConformance) Controls whether each item inlistsmust conform to the defined item value descriptor.Requires that the length oflistis enforced to not contain less than the defined minimum length.enforceListLengthLowerBound(boolean enforceListLengthLowerBound) Controls whether the length oflistis enforced to not contain less than the defined minimum length.Requires that the length oflistsis enforced to not contain more items than the defined maximum length of the list.enforceListLengthUpperBound(boolean enforceListLengthUpperBound) Controls whether the length oflistsis enforced to not contain more items than the defined maximum length of the list.Requires that each value inmapsmust conform to the defined value descriptor.enforceMapValueConformance(boolean enforceMapValueConformance) Controls whether each value inmapsmust conform to the defined value descriptor.enforceNumberRange(boolean enforceNumberRange) Requires that each optional field inrecordsmust conform to the defined value descriptor.enforceRecordOptionalFieldValueConformance(boolean enforceRecordOptionalFieldValueConformance) Controls whether each optional field inrecordsmust conform to the defined value descriptor.Requires that each required field inrecordsmust conform to the defined value descriptor.enforceRecordRequiredFieldValueConformance(boolean enforceRecordRequiredFieldValueConformance) Controls whether each required field inrecordsmust conform to the defined value descriptor.Requires that the length ofstringsis enforced to not be shorter than the defined minimum length of the string.enforceStringLengthLowerBound(boolean enforceStringLengthLowerBound) Controls whether the length ofstringsis enforced to not be shorter than the defined minimum length of the string.Requires that the length ofstringsis enforced to not be longer than the defined maximum length of the string.enforceStringLengthUpperBound(boolean enforceStringLengthUpperBound) Controls whether the length ofstringsis enforced to not be longer than the defined maximum length of the string.Requires that each element intuplesmust conform to the defined value descriptor at the respective index.enforceTupleElementConformance(boolean enforceTupleElementConformance) Controls whether each element intuplesmust conform to the defined value descriptor at the respective index.Forbids extraneous fields inrecordsthat are not defined in the record descriptor.Forbids extraneous elements intuples, i.e. values at indices larger than the highest index defined in the tuple descriptor.Forbids values forvoiddescriptors.Forbids constant values inconstantsto mismatch the defined constant value.Forbidsrecordsto have missing fields that are marked as required in the record descriptor.Forbidstuplesto have fewer elements than defined in the tuple descriptor.Ignores the constraint that each an item inlistsmust conform to the defined item value descriptor.Ignores the constraint that the length oflistsis enforced to not contain less than the defined minimum length.Ignores the constraint that the length oflistsis enforced to not contain more items than the defined maximum length of the list.Ignores the constraint that each value inmapsmust conform to the defined value descriptor.Ignores the constraint that each optional field inrecordsmust conform to the defined value descriptor.Ignores the constraint that each required field inrecordsmust conform to the defined value descriptor.Ignores the constraint that the length ofstringsis enforced to not be shorter than the defined minimum length of the string.Ignores the constraint that the length ofstringsis enforced to not be longer than the defined maximum length of the string.Ignores the constraint that each element intuplesmust conform to the defined value descriptor at the respective index.typeCoercer(IValueDescriptorTypeCoercer typeCoercer) Enables types coercion of values.
-
Method Details
-
allowExtraneousRecordFields
public ValueAcceptanceCriteria.Builder allowExtraneousRecordFields(boolean allowExtraneousRecordFields) Controls whether extraneous fields inrecordsare allowed that are not defined in the record descriptor.- Parameters:
allowExtraneousRecordFields- true if extraneous fields are allowed, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowExtraneousRecordFields
Allows extraneous fields inrecordsthat are not defined in the record descriptor.- Returns:
- This builder instance for chaining method calls.
-
allowExtraneousTupleElements
public ValueAcceptanceCriteria.Builder allowExtraneousTupleElements(boolean allowExtraneousTupleElements) Controls whether extraneous elements intuplesare allowed, i.e. values at indices larger than the highest index defined in the tuple descriptor.- Parameters:
allowExtraneousTupleElements- true if extraneous elements are allowed, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowExtraneousTupleElements
Allows extraneous elements intuples, i.e. values at indices larger than the highest index defined in the tuple descriptor.- Returns:
- This builder instance for chaining method calls.
-
allowExtraneousVoidValues
Whether to allow values forvoiddescriptors. Void values must not have any value, i.e. must benull. This criterion controls whether such values are accepted or rejected.- Parameters:
allowExtraneousVoidValues- true if void values are accepted, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowExtraneousVoidValues
Allows values forvoiddescriptors. Void values must not have any value, i.e. must benull. This criterion controls whether such values are accepted or rejected.- Returns:
- This builder instance for chaining method calls.
-
allowMismatchingConst
Controls whether constant values inconstantsare allowed to mismatch the defined constant value. Also applies toINullValueDescriptor, which is a constant null value.- Parameters:
allowMismatchingConst- true if mismatching constants are allowed, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowMismatchingConst
Allows constant values inconstantsto mismatch the defined constant value. Also applies toINullValueDescriptor, which is a constant null value.- Returns:
- This builder instance for chaining method calls.
-
allowMissingRequiredRecordFields
public ValueAcceptanceCriteria.Builder allowMissingRequiredRecordFields(boolean allowMissingRequiredRecordFields) Controls whetherrecordsare allowed to have missing fields that are marked as required in the record descriptor.- Parameters:
allowMissingRequiredRecordFields- true if missing required fields are allowed, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowMissingRequiredRecordFields
Allowsrecordsto have missing fields that are marked as required in the record descriptor.- Returns:
- This builder instance for chaining method calls.
-
allowMissingTupleElements
Controls whethertuplesare allowed to have fewer elements than defined in the tuple descriptor.- Parameters:
allowMissingTupleElements- true if missing fields are allowed, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
allowMissingTupleElements
Allowstuplesto have fewer elements than defined in the tuple descriptor.- Returns:
- This builder instance for chaining method calls.
-
allowNonStringKeys
-
allowNonStringKeys
-
build
Creates a new value acceptance criteria instance from the current builder state.- Returns:
- A new value acceptance criteria instance.
-
disableTypeCoercion
Disables type coercion of values.- Returns:
- This builder instance for chaining method calls.
-
enableLargeStringInteroperability
public ValueAcceptanceCriteria.Builder enableLargeStringInteroperability(boolean enableLargeStringInteroperability) Whether to treatStringandLargeStringas equivalent types for the purpose of value acceptance. This allows, for example, aIStringValueDescriptorto accept aLargeStringvalue.- Parameters:
enableLargeStringInteroperability- true to enable interoperability, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enableTypeCoercion
Whether to enable type coercion of values. When true, allows coercion of values to conform to the defined value descriptor. For example, a floating-point number may be coerced to an integer by truncating the decimal part; or a string representing a number may be coerced to an actual numeric type.- Parameters:
enableTypeCoercion- true if type coercion is enabled, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enableTypeCoercion
Enables type coercion of values. Allows coercion of values to conform to the defined value descriptor. For example, a floating-point number may be coerced to an integer by truncating the decimal part; or a string representing a number may be coerced to an actual numeric type.- Returns:
- This builder instance for chaining method calls.
-
enforceListItemConformance
public ValueAcceptanceCriteria.Builder enforceListItemConformance(boolean enforceListItemConformance) Controls whether each item inlistsmust conform to the defined item value descriptor.- Parameters:
enforceListItemConformance- true if each item must conform, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceListItemConformance
Requires that each item inlistsmust conform to the defined item value descriptor.- Returns:
- This builder instance for chaining method calls.
-
enforceListLengthLowerBound
public ValueAcceptanceCriteria.Builder enforceListLengthLowerBound(boolean enforceListLengthLowerBound) Controls whether the length oflistis enforced to not contain less than the defined minimum length.- Parameters:
enforceListLengthLowerBound- true if the list length lower bound is enforced, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceListLengthLowerBound
Requires that the length oflistis enforced to not contain less than the defined minimum length.- Returns:
- This builder instance for chaining method calls.
-
enforceListLengthUpperBound
public ValueAcceptanceCriteria.Builder enforceListLengthUpperBound(boolean enforceListLengthUpperBound) Controls whether the length oflistsis enforced to not contain more items than the defined maximum length of the list.- Parameters:
enforceListLengthUpperBound- true if the list length upper bound is enforced, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceListLengthUpperBound
Requires that the length oflistsis enforced to not contain more items than the defined maximum length of the list.- Returns:
- This builder instance for chaining method calls.
-
enforceMapValueConformance
public ValueAcceptanceCriteria.Builder enforceMapValueConformance(boolean enforceMapValueConformance) Controls whether each value inmapsmust conform to the defined value descriptor.- Parameters:
enforceMapValueConformance- true if each value must conform, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceMapValueConformance
Requires that each value inmapsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
enforceNumberRange
-
enforceNumberRange
-
enforceRecordOptionalFieldValueConformance
public ValueAcceptanceCriteria.Builder enforceRecordOptionalFieldValueConformance(boolean enforceRecordOptionalFieldValueConformance) Controls whether each optional field inrecordsmust conform to the defined value descriptor.- Parameters:
enforceRecordOptionalFieldValueConformance- true if each optional field must conform, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceRecordOptionalFieldValueConformance
Requires that each optional field inrecordsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
enforceRecordRequiredFieldValueConformance
public ValueAcceptanceCriteria.Builder enforceRecordRequiredFieldValueConformance(boolean enforceRecordRequiredFieldValueConformance) Controls whether each required field inrecordsmust conform to the defined value descriptor.- Parameters:
enforceRecordRequiredFieldValueConformance- true if each required field must conform, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceRecordRequiredFieldValueConformance
Requires that each required field inrecordsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
enforceStringLengthLowerBound
public ValueAcceptanceCriteria.Builder enforceStringLengthLowerBound(boolean enforceStringLengthLowerBound) Controls whether the length ofstringsis enforced to not be shorter than the defined minimum length of the string.- Parameters:
enforceStringLengthLowerBound- true if the string length lower bound is enforced, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceStringLengthLowerBound
Requires that the length ofstringsis enforced to not be shorter than the defined minimum length of the string.- Returns:
- This builder instance for chaining method calls.
-
enforceStringLengthUpperBound
public ValueAcceptanceCriteria.Builder enforceStringLengthUpperBound(boolean enforceStringLengthUpperBound) Controls whether the length ofstringsis enforced to not be longer than the defined maximum length of the string.- Parameters:
enforceStringLengthUpperBound- true if the string length upper bound is enforced, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceStringLengthUpperBound
Requires that the length ofstringsis enforced to not be longer than the defined maximum length of the string.- Returns:
- This builder instance for chaining method calls.
-
enforceTupleElementConformance
public ValueAcceptanceCriteria.Builder enforceTupleElementConformance(boolean enforceTupleElementConformance) Controls whether each element intuplesmust conform to the defined value descriptor at the respective index.- Parameters:
enforceTupleElementConformance- true if each element must conform, false otherwise.- Returns:
- This builder instance for chaining method calls.
-
enforceTupleElementConformance
Requires that each element intuplesmust conform to the defined value descriptor at the respective index.- Returns:
- This builder instance for chaining method calls.
-
forbidExtraneousRecordFields
Forbids extraneous fields inrecordsthat are not defined in the record descriptor.- Returns:
- This builder instance for chaining method calls.
-
forbidExtraneousTupleElements
Forbids extraneous elements intuples, i.e. values at indices larger than the highest index defined in the tuple descriptor.- Returns:
- This builder instance for chaining method calls.
-
forbidExtraneousVoidElements
Forbids values forvoiddescriptors. Void values must not have any value, i.e. must benull. This criterion controls whether such values are accepted or rejected.- Returns:
- This builder instance for chaining method calls.
-
forbidMismatchingConst
Forbids constant values inconstantsto mismatch the defined constant value. Also applies toINullValueDescriptor, which is a constant null value.- Returns:
- This builder instance for chaining method calls.
-
forbidMissingRequiredRecordFields
Forbidsrecordsto have missing fields that are marked as required in the record descriptor.- Returns:
- This builder instance for chaining method calls.
-
forbidMissingTupleElements
Forbidstuplesto have fewer elements than defined in the tuple descriptor.- Returns:
- This builder instance for chaining method calls.
-
forbidNonStringKeys
-
ignoreListItemConformance
Ignores the constraint that each an item inlistsmust conform to the defined item value descriptor.- Returns:
- This builder instance for chaining method calls.
-
ignoreListLengthLowerBound
Ignores the constraint that the length oflistsis enforced to not contain less than the defined minimum length.- Returns:
- This builder instance for chaining method calls.
-
ignoreListLengthUpperBound
Ignores the constraint that the length oflistsis enforced to not contain more items than the defined maximum length of the list.- Returns:
- This builder instance for chaining method calls.
-
ignoreMapValueConformance
Ignores the constraint that each value inmapsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
ignoreNumberRange
-
ignoreRecordOptionalFieldValueConformance
Ignores the constraint that each optional field inrecordsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
ignoreRecordRequiredFieldValueConformance
Ignores the constraint that each required field inrecordsmust conform to the defined value descriptor.- Returns:
- This builder instance for chaining method calls.
-
ignoreStringLengthLowerBound
Ignores the constraint that the length ofstringsis enforced to not be shorter than the defined minimum length of the string.- Returns:
- This builder instance for chaining method calls.
-
ignoreStringLengthUpperBound
Ignores the constraint that the length ofstringsis enforced to not be longer than the defined maximum length of the string.- Returns:
- This builder instance for chaining method calls.
-
ignoreTupleElementConformance
Ignores the constraint that each element intuplesmust conform to the defined value descriptor at the respective index.- Returns:
- This builder instance for chaining method calls.
-
typeCoercer
Enables types coercion of values. Sets a custom type coercer to use. For example, a floating-point number may be coerced to an integer by truncating the decimal part; or a string representing a number may be coerced to an actual numeric type.- Parameters:
typeCoercer- The type coercer to use.- Returns:
- This builder instance for chaining method calls.
-