Interface INodeReturnedExceptionBuilder
-
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<NodeReturnedException>
,IAbruptCompletionExceptionBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
,ICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
,ISuccessResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
public interface INodeReturnedExceptionBuilder extends ISuccessResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>, IAbruptCompletionExceptionBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
Builder for the exception thrown by a node when it wishes to stop the current execution by issuing a return statement. When no value is supplied, the defaults of the value descriptor are used.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description INodeReturnedExceptionBuilder
always(IValueCreator<?> alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default INodeReturnedExceptionBuilder
always(Object alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).INodeReturnedExceptionBuilder
cause(Throwable cause)
INodeReturnedExceptionBuilder
file(IWorkflowFileValue fileValue)
Sets (replaces) the files made available by the plugin when it was executed successfully.default INodeReturnedExceptionBuilder
file(File... files)
Sets (replaces) the files made available by the plugin when it was executed successfully.default INodeReturnedExceptionBuilder
file(Iterable<File> files)
Sets (replaces) the files made available by the plugin when it was executed successfully.INodeReturnedExceptionBuilder
message(String message)
INodeReturnedExceptionBuilder
success(IValueCreator<?> successValue)
Sets (replaces) the value returned by the node when it was executed successfully.default INodeReturnedExceptionBuilder
success(Object value)
Sets (replaces) the value returned by the node when it was executed successfully.-
Methods inherited from interface de.xima.fc.interfaces.workflow.params.ISuccessResultBuilder
softError, softError, softError
-
-
-
-
Method Detail
-
always
INodeReturnedExceptionBuilder always(IValueCreator<?> alwaysValue)
Description copied from interface:ICompletionResultBuilder
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);
- Specified by:
always
in interfaceICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
alwaysValue
- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
file
INodeReturnedExceptionBuilder file(IWorkflowFileValue fileValue)
Description copied from interface:ICompletionResultBuilder
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.- Specified by:
file
in interfaceICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
fileValue
- File or files supplied by the plugin.- Returns:
- This builder for chaining methods calls.
-
cause
INodeReturnedExceptionBuilder cause(Throwable cause)
- Specified by:
cause
in interfaceIAbruptCompletionExceptionBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
cause
- The cause that resulted in the returning exception. Since a return is usually intended, you should not have to call this method in most cases.- Returns:
- this for chaining.
-
message
INodeReturnedExceptionBuilder message(String message)
- Specified by:
message
in interfaceIAbruptCompletionExceptionBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
message
- The cause that resulted in the returning exception. Since a return is usually intended, you should not have to call this method in most cases.- Returns:
- this for chaining.
-
success
INodeReturnedExceptionBuilder success(IValueCreator<?> successValue)
Description copied from interface:ISuccessResultBuilder
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);
- Specified by:
success
in interfaceISuccessResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
successValue
- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
always
default INodeReturnedExceptionBuilder always(Object alwaysValue)
Description copied from interface:ICompletionResultBuilder
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.- Specified by:
always
in interfaceICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
alwaysValue
- Value made available by the plugin when it was executed.- Returns:
- This builder for chaining methods calls.
-
file
default INodeReturnedExceptionBuilder file(File... files)
Description copied from interface:ICompletionResultBuilder
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 i@Override s called multiple times, only the value supplied by the last invocation is used.- Specified by:
file
in interfaceICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
files
- File or files supplied by the plugin.- Returns:
- This builder for chaining methods calls.
-
file
default INodeReturnedExceptionBuilder file(Iterable<File> files)
Description copied from interface:ICompletionResultBuilder
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.- Specified by:
file
in interfaceICompletionResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
files
- File or files supplied by the plugin.- Returns:
- This builder for chaining methods calls.
-
success
default INodeReturnedExceptionBuilder success(Object value)
Description copied from interface:ISuccessResultBuilder
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.- Specified by:
success
in interfaceISuccessResultBuilder<INodeReturnedExceptionBuilder,NodeReturnedException>
- Parameters:
value
- Value made available by the plugin when it was executed successfully.- Returns:
- This builder for chaining methods calls.
-
-