Class CodeOnlyStandardFileListResolutionErrorCreator
- java.lang.Object
-
- de.xima.fc.workflow.processor.logic.execution.CodeOnlyStandardFileListResolutionErrorCreator
-
- All Implemented Interfaces:
IStandardFileListResolutionErrorCreator
public final class CodeOnlyStandardFileListResolutionErrorCreator extends Object implements IStandardFileListResolutionErrorCreator
Implementation ofIStandardFileListResolutionErrorCreator
that lets you customize only the error code for each error type, and provides no error data.- Since:
- 7.1.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeOnlyStandardFileListResolutionErrorCreator.Builder
Builder to buildCodeOnlyStandardFileListResolutionErrorCreator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CodeOnlyStandardFileListResolutionErrorCreator.Builder
builder()
Creates builder to buildIStandardFileListResolutionErrorCreator
.IDiscriminatedUnionMember<String,Object>
forDatabaseError(AFileListResolutionError error, boolean softError)
Creates the error code and data for when an error occurred during database communication.IDiscriminatedUnionMember<String,Object>
forFileSystemError(AFileListResolutionError 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(AFileListResolutionError error, boolean softError)
Creates the error code and data for when a general error occurred.IDiscriminatedUnionMember<String,Object>
forNetworkError(AFileListResolutionError error, boolean softError)
Creates the error code and data for when data could not be read from the network.IDiscriminatedUnionMember<String,Object>
forNoSourceFileFound(AFileListResolutionError error, boolean softError)
Creates the error code and data for when no source file could be found.static IStandardFileListResolutionErrorCreator
standardCodes()
-
-
-
Method Detail
-
forDatabaseError
public IDiscriminatedUnionMember<String,Object> forDatabaseError(AFileListResolutionError error, boolean softError)
Description copied from interface:IStandardFileListResolutionErrorCreator
Creates the error code and data for when an error occurred during database communication.- Specified by:
forDatabaseError
in interfaceIStandardFileListResolutionErrorCreator
- 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(AFileListResolutionError error, boolean softError)
Description copied from interface:IStandardFileListResolutionErrorCreator
Creates the error code and data for when data could not be read from or written to the file system.- Specified by:
forFileSystemError
in interfaceIStandardFileListResolutionErrorCreator
- 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(AFileListResolutionError error, boolean softError)
Description copied from interface:IStandardFileListResolutionErrorCreator
Creates the error code and data for when a general error occurred.- Specified by:
forGeneral
in interfaceIStandardFileListResolutionErrorCreator
- 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.
-
forNetworkError
public IDiscriminatedUnionMember<String,Object> forNetworkError(AFileListResolutionError error, boolean softError)
Description copied from interface:IStandardFileListResolutionErrorCreator
Creates the error code and data for when data could not be read from the network.- Specified by:
forNetworkError
in interfaceIStandardFileListResolutionErrorCreator
- 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.
-
forNoSourceFileFound
public IDiscriminatedUnionMember<String,Object> forNoSourceFileFound(AFileListResolutionError error, boolean softError)
Description copied from interface:IStandardFileListResolutionErrorCreator
Creates the error code and data for when no source file could be found.- Specified by:
forNoSourceFileFound
in interfaceIStandardFileListResolutionErrorCreator
- 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 CodeOnlyStandardFileListResolutionErrorCreator.Builder builder()
Creates builder to buildIStandardFileListResolutionErrorCreator
. When a code is not set explicitly, the default codes are used.- Returns:
- A new builder for a
IStandardFileListResolutionErrorCreator
.
-
standardCodes
public static IStandardFileListResolutionErrorCreator standardCodes()
- Returns:
- A
IStandardFileListResolutionErrorCreator
with the standard error codes and no error data.
-
-