Interface INormalCompletionResultBuilder
-
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<INormalCompletionResult>
public interface INormalCompletionResultBuilder extends org.apache.commons.lang3.builder.Builder<INormalCompletionResult>
Builder for the result returned by a node when it was executed successfully.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description INormalCompletionResultBuilderalways(IValueCreator<?> alwaysValue)Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default INormalCompletionResultBuilderalways(Object alwaysValue)Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).INormalCompletionResultBuilderfile(IWorkflowFileValue fileValue)Sets (replaces) the files made available by the plugin when it was executed successfully.default INormalCompletionResultBuilderfile(File... files)Sets (replaces) the files made available by the plugin when it was executed successfully.default INormalCompletionResultBuilderfile(Iterable<File> files)Sets (replaces) the files made available by the plugin when it was executed successfully.INormalCompletionResultBuildersuccess(IValueCreator<?> successValue)Sets (replaces) the value returned by the node when it was executed successfully.default INormalCompletionResultBuildersuccess(Object value)Sets (replaces) the value returned by the node when it was executed successfully.
-
-
-
Method Detail
-
always
INormalCompletionResultBuilder always(IValueCreator<?> alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception). When this method is not called, the default value from theIExecutionResultDescriptor.getAlwaysValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.For example, when you wish to return a record with two properties:
// Corresponds to the JSON object {"foo": "bar", "baz": 42} builder.success(b -> b.asRecord().property("foo", "bar").property("baz", 42);- Parameters:
alwaysValue- Function that takes a value builder to create the value.- Returns:
- this for chaining.
-
always
default INormalCompletionResultBuilder always(Object alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception). When this method is not called, the default value from theIExecutionResultDescriptor.getAlwaysValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
alwaysValue- Value made available by the plugin when it was executed.- Returns:
- this for chaining.
-
file
default INormalCompletionResultBuilder file(File... files)
Sets (replaces) the files made available by the plugin when it was executed successfully. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
files- File or files supplied by the plugin.- Returns:
- this for chaining.
-
file
default INormalCompletionResultBuilder file(Iterable<File> files)
Sets (replaces) the files made available by the plugin when it was executed successfully. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
files- File or files supplied by the plugin.- Returns:
- this for chaining.
-
file
INormalCompletionResultBuilder file(IWorkflowFileValue fileValue)
Sets (replaces) the files made available by the plugin when it was executed successfully. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
fileValue- File or files supplied by the plugin.- Returns:
- this for chaining.
-
success
INormalCompletionResultBuilder success(IValueCreator<?> successValue)
Sets (replaces) the value returned by the node when it was executed successfully. This value is ignored unless the node was actually executed successfully. When this method is not called, the default value from theIExecutionResultDescriptor.getSuccessValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.For example, when you wish to return a record with two properties:
// Corresponds to the JSON object {"foo": "bar", "baz": 42} builder.success(b -> b.asRecord().property("foo", "bar").property("baz", 42);- Parameters:
successValue- Function that takes a value builder to create the value.- Returns:
- this for chaining.
-
success
default INormalCompletionResultBuilder success(Object value)
Sets (replaces) the value returned by the node when it was executed successfully. This value is ignored unless the node was actually executed successfully. When this method is not called, the default value from theIExecutionResultDescriptor.getSuccessValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
value- Value made available by the plugin when it was executed successfully.- Returns:
- this for chaining.
-
-