Interface IWorkflowElementValidationResultBuilder
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<IWorkflowElementValidationResult>
- All Known Implementing Classes:
ElementResultBuilder
public interface IWorkflowElementValidationResultBuilder
extends org.apache.commons.lang3.builder.Builder<IWorkflowElementValidationResult>
Simple builder for a
IWorkflowElementValidationResult
. Can be accessed via
IWorkflowLocalValidationContext.resultBuilder()
. The default validation state of the result is valid
,
call markInvalid()
to mark the result as invalid.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionaddException
(Throwable exception) Adds the exceptions to the validation result, seeIWorkflowElementValidationResult.getExceptions()
.addExceptions
(Iterable<Throwable> exception) Adds an exception to the validation result, seeIWorkflowElementValidationResult.getExceptions()
.addMessage
(IWorkflowValidationMessage message) Adds the given message @Override to the validation result.addMessage
(EValidationSeverity severity, String localizedMessage) Adds a message to the validation result.addMessages
(Iterable<IWorkflowValidationMessage> messages) Adds the given messages to the validation result.append
(IWorkflowElementValidationResult validationResult) Appends the given validation result to this builder.Marks the validation result as invalid.setValid
(boolean valid) Marks the validation result as invalid.Methods inherited from interface org.apache.commons.lang3.builder.Builder
build
-
Method Details
-
addException
Adds the exceptions to the validation result, seeIWorkflowElementValidationResult.getExceptions()
.- Parameters:
exception
- Exceptions to add that occurred during validation.- Returns:
- This builder instance for chaining.
-
addExceptions
Adds an exception to the validation result, seeIWorkflowElementValidationResult.getExceptions()
.- Parameters:
exception
- Exception to add that occurred during validation.- Returns:
- This builder instance for chaining.
-
addMessage
IWorkflowElementValidationResultBuilder addMessage(EValidationSeverity severity, String localizedMessage) Adds a message to the validation result.- Parameters:
severity
- Severity of the message to add.localizedMessage
- Localized message to add.- Returns:
- This builder instance for chaining.
-
addMessage
Adds the given message @Override to the validation result.- Parameters:
message
- Message to add.- Returns:
- This builder instance for chaining.
-
addMessages
Adds the given messages to the validation result.- Parameters:
messages
- Messages to add.- Returns:
- This builder instance for chaining.
-
append
Appends the given validation result to this builder. All messages are added, and this result is marked as invalid when the given result is invalid.- Parameters:
validationResult
- Validation result to add to the list of results.- Returns:
- This builder instance for chaining.
-
markInvalid
IWorkflowElementValidationResultBuilder markInvalid()Marks the validation result as invalid. By default, the result will be valid.- Returns:
- This builder instance for chaining.
-
setValid
Marks the validation result as invalid. By default, the result will be valid.- Parameters:
valid
-true
to mark the result as valid,false
to mark it as invalid.- Returns:
- This builder instance for chaining.
-