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 aIWorkflowElementValidationResult
. Can be accessed viaIWorkflowLocalValidationContext.resultBuilder()
. The default validation state of the result isvalid
, callmarkInvalid()
to mark the result as invalid.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
-
-
-
Method Detail
-
addException
IWorkflowElementValidationResultBuilder addException(Throwable exception)
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
IWorkflowElementValidationResultBuilder addExceptions(Iterable<Throwable> exception)
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
IWorkflowElementValidationResultBuilder addMessage(IWorkflowValidationMessage message)
Adds the given message @Override to the validation result.- Parameters:
message
- Message to add.- Returns:
- This builder instance for chaining.
-
addMessages
IWorkflowElementValidationResultBuilder addMessages(Iterable<IWorkflowValidationMessage> messages)
Adds the given messages to the validation result.- Parameters:
messages
- Messages to add.- Returns:
- This builder instance for chaining.
-
append
IWorkflowElementValidationResultBuilder append(IWorkflowElementValidationResult validationResult)
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
-- 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
IWorkflowElementValidationResultBuilder setValid(boolean valid)
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.
-
-