Interface INormalCompletionResultBuilder
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<INormalCompletionResult>, ICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>, ISuccessResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionalways(IValueCreator alwaysValue) Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default INormalCompletionResultBuilderSets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default INormalCompletionResultBuilderfile(IWorkflowFileValue fileValue) Sets (replaces) the files made available by the node when it was executed.default INormalCompletionResultBuilderSets (replaces) the files made available by the node when it was executed, using thedefault file key.default INormalCompletionResultBuilderSets (replaces) the files made available by the node when it was executed, using thedefault file key.success(IValueCreator successValue) Sets (replaces) the value returned by the node when it was executed successfully.default INormalCompletionResultBuilderSets (replaces) the value returned by the node when it was executed successfully.Methods inherited from interface org.apache.commons.lang3.builder.Builder
buildMethods inherited from interface ICompletionResultBuilder
attachment, attachment, attachment, file, file, fileMethods inherited from interface ISuccessResultBuilder
softError, softError, softError, softError
-
Method Details
-
always
Description copied from interface:ICompletionResultBuilderSets (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);- Specified by:
alwaysin interfaceICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
alwaysValue- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
always
Description copied from interface:ICompletionResultBuilderSets (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.- Specified by:
alwaysin interfaceICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
alwaysValue- Value made available by the node when it was executed.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the node when it was executed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
fileValue- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the node when it was executed, using thedefault file key. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
files- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the node when it was executed, using thedefault file key. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
files- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
success
Description copied from interface:ISuccessResultBuilderSets (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 gets used.- Specified by:
successin interfaceISuccessResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
value- Value made available by the plugin when it was executed successfully.- Returns:
- This builder for chaining methods calls.
-
success
Description copied from interface:ISuccessResultBuilderSets (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 gets 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);- Specified by:
successin interfaceISuccessResultBuilder<INormalCompletionResultBuilder, INormalCompletionResult>- Parameters:
successValue- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-