Class CodeOnlyStandardAttachmentListResolutionErrorCreator
- java.lang.Object
-
- de.xima.fc.workflow.processor.logic.execution.CodeOnlyStandardAttachmentListResolutionErrorCreator
-
- All Implemented Interfaces:
IStandardAttachmentListResolutionErrorCreator
public final class CodeOnlyStandardAttachmentListResolutionErrorCreator extends Object implements IStandardAttachmentListResolutionErrorCreator
Implementation ofIStandardAttachmentListResolutionErrorCreator
that lets you customize only the error code for each error type, and provides no error data.- Since:
- 8.1.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeOnlyStandardAttachmentListResolutionErrorCreator.Builder
Builder to buildCodeOnlyStandardAttachmentListResolutionErrorCreator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CodeOnlyStandardAttachmentListResolutionErrorCreator.Builder
builder()
Creates builder to buildIStandardAttachmentListResolutionErrorCreator
.IDiscriminatedUnionMember<String,Object>
forDatabaseError(AAttachmentListResolutionError error, boolean softError)
Creates the error code and data for when an error occurred during database communication.IDiscriminatedUnionMember<String,Object>
forFileSystemError(AAttachmentListResolutionError error, boolean softError)
Creates the error code and data for when data could not be read from or written to the file system.IDiscriminatedUnionMember<String,Object>
forGeneral(AAttachmentListResolutionError error, boolean softError)
Creates the error code and data for when a general error occurred.IDiscriminatedUnionMember<String,Object>
forNoSourceAttachmentFound(AAttachmentListResolutionError error, boolean softError)
Creates the error code and data for when no attachment could be found.static IStandardAttachmentListResolutionErrorCreator
standardCodes()
-
-
-
Method Detail
-
forDatabaseError
public IDiscriminatedUnionMember<String,Object> forDatabaseError(AAttachmentListResolutionError error, boolean softError)
Description copied from interface:IStandardAttachmentListResolutionErrorCreator
Creates the error code and data for when an error occurred during database communication.- Specified by:
forDatabaseError
in interfaceIStandardAttachmentListResolutionErrorCreator
- Parameters:
error
- Error that occurred.softError
-true
if a soft error should be created,false
if a hard error should be created.- Returns:
- The error code and error data.
-
forFileSystemError
public IDiscriminatedUnionMember<String,Object> forFileSystemError(AAttachmentListResolutionError error, boolean softError)
Description copied from interface:IStandardAttachmentListResolutionErrorCreator
Creates the error code and data for when data could not be read from or written to the file system.- Specified by:
forFileSystemError
in interfaceIStandardAttachmentListResolutionErrorCreator
- Parameters:
error
- Error that occurred.softError
-true
if a soft error should be created,false
if a hard error should be created.- Returns:
- The error code and error data.
-
forGeneral
public IDiscriminatedUnionMember<String,Object> forGeneral(AAttachmentListResolutionError error, boolean softError)
Description copied from interface:IStandardAttachmentListResolutionErrorCreator
Creates the error code and data for when a general error occurred.- Specified by:
forGeneral
in interfaceIStandardAttachmentListResolutionErrorCreator
- Parameters:
error
- Error that occurred.softError
-true
if a soft error should be created,false
if a hard error should be created.- Returns:
- The error code and error data.
-
forNoSourceAttachmentFound
public IDiscriminatedUnionMember<String,Object> forNoSourceAttachmentFound(AAttachmentListResolutionError error, boolean softError)
Description copied from interface:IStandardAttachmentListResolutionErrorCreator
Creates the error code and data for when no attachment could be found.- Specified by:
forNoSourceAttachmentFound
in interfaceIStandardAttachmentListResolutionErrorCreator
- Parameters:
error
- Error that occurred.softError
-true
if a soft error should be created,false
if a hard error should be created.- Returns:
- The error code and error data.
-
builder
public static CodeOnlyStandardAttachmentListResolutionErrorCreator.Builder builder()
Creates builder to buildIStandardAttachmentListResolutionErrorCreator
. When a code is not set explicitly, the default codes are used.- Returns:
- A new builder for a
IStandardAttachmentListResolutionErrorCreator
.
-
standardCodes
public static IStandardAttachmentListResolutionErrorCreator standardCodes()
- Returns:
- A
IStandardAttachmentListResolutionErrorCreator
with the standard error codes and no error data.
-
-