Package de.xima.fc.workflow.executor
Class FcProcessLogPdfExecutor
- java.lang.Object
-
- de.xima.fc.workflow.executor.FcProcessLogPdfExecutor
-
- All Implemented Interfaces:
IWorkflowActionExecutor
public final class FcProcessLogPdfExecutor extends Object
Handler for executing a workflow action of typeEWorkflowNodeType.FC_PROCESS_LOG_PDF
.- Since:
- 7.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
Fields Modifier and Type Field Description protected IWorkflowExecutionContext
ctx
protected IWorkflowExecutionEnvironmentData
env
protected static org.slf4j.Logger
LOG
protected WorkflowNode
node
protected INodeExecutionParams<TData>
params
protected TData
props
-
Constructor Summary
Constructors Constructor Description FcProcessLogPdfExecutor(INodeExecutionParams<FcProcessLogPdfProps> params)
Creates a new executor for executing a protocol history pdf action with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Attachment>
attachFilesToFormRecord(TError fileSystemError, TError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File... files)
protected List<Attachment>
attachFilesToFormRecord(TError fileSystemError, TError databaseError, File... files)
Attaches the given files to the form record.protected Attachment
attachFileToFormRecord(TError fileSystemError, TError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File file)
protected Attachment
attachFileToFormRecord(TError fileSystemError, TError databaseError, File file)
Attaches the given file to the form record.protected Mandant
client()
protected <T> NodeThrewException
createException(TError code)
protected <T> NodeThrewException
createException(TError code, String message)
protected NodeThrewException
createException(TError code, String message, Throwable cause)
protected NodeThrewException
createException(TError code, String message, Throwable cause, Consumer<IRecordValueBuilder> errorData)
protected <T> NodeThrewException
createException(TError code, String message, Consumer<IRecordValueBuilder> errorData)
protected NodeThrewException
createException(TError code, Throwable cause)
protected NodeThrewException
createException(TError code, Throwable cause, Consumer<IRecordValueBuilder> errorData)
protected <T> NodeThrewException
createException(TError code, Consumer<IRecordValueBuilder> errorData)
protected NodeThrewException
createExceptionWithData(TError code, Throwable cause, Object errorData)
protected IEntityContext
ec()
INormalCompletionResult
execute()
Executes the workflow action, and creates the result.protected Vorgang
formRecord()
protected String
getCombinedFileName(List<IResolvedFile> files, String defaultFileName, String extension)
protected Locale
locale()
protected Projekt
project()
-
-
-
Field Detail
-
LOG
protected static final org.slf4j.Logger LOG
-
ctx
protected final IWorkflowExecutionContext ctx
-
env
protected final IWorkflowExecutionEnvironmentData env
-
node
protected final WorkflowNode node
-
params
protected final INodeExecutionParams<TData> params
-
props
protected final TData props
-
-
Constructor Detail
-
FcProcessLogPdfExecutor
public FcProcessLogPdfExecutor(INodeExecutionParams<FcProcessLogPdfProps> params)
Creates a new executor for executing a protocol history pdf action with the given params.- Parameters:
params
- Parameters as provided the node handler, with the environment data and the action's properties model.
-
-
Method Detail
-
execute
public INormalCompletionResult execute() throws AbstractAbruptCompletionException
Description copied from interface:IWorkflowActionExecutor
Executes the workflow action, and creates the result.- Returns:
- The success result to be returned by the post action.
- Throws:
NodeThrewException
- When the workflow action failed, as described byTError
.AbstractAbruptCompletionException
- When the action could not be completed normally for another reason (such as when it needs to return).
-
attachFilesToFormRecord
protected final List<Attachment> attachFilesToFormRecord(TError fileSystemError, TError databaseError, File... files) throws NodeThrewException
Attaches the given files to the form record.- Parameters:
fileSystemError
- Error code to raise when a file could not be read from the file system.databaseError
- Error code to raise when the attachment could not be persisted in the database.files
- Files to attach.- Returns:
- The newly created attachments.
- Throws:
NodeThrewException
- When the attachments could not be created.
-
attachFileToFormRecord
protected final Attachment attachFileToFormRecord(TError fileSystemError, TError databaseError, File file) throws NodeThrewException
Attaches the given file to the form record.- Parameters:
fileSystemError
- Error code to raise when a file could not be read from the file system.databaseError
- Error code to raise when the attachment could not be persisted in the database.file
- File to attach.- Returns:
- The newly created attachment.
- Throws:
NodeThrewException
- When the attachments could not be created.
-
attachFilesToFormRecord
protected final List<Attachment> attachFilesToFormRecord(TError fileSystemError, TError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File... files) throws NodeThrewException
- Throws:
NodeThrewException
-
attachFileToFormRecord
protected final Attachment attachFileToFormRecord(TError fileSystemError, TError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File file) throws NodeThrewException
- Throws:
NodeThrewException
-
client
protected final Mandant client()
-
createException
protected final <T> NodeThrewException createException(TError code)
-
createException
protected final <T> NodeThrewException createException(TError code, Consumer<IRecordValueBuilder> errorData)
-
createException
protected final <T> NodeThrewException createException(TError code, String message)
-
createException
protected final <T> NodeThrewException createException(TError code, String message, Consumer<IRecordValueBuilder> errorData)
-
createException
protected final NodeThrewException createException(TError code, String message, Throwable cause)
-
createException
protected final NodeThrewException createException(TError code, String message, Throwable cause, Consumer<IRecordValueBuilder> errorData)
-
createException
protected final NodeThrewException createException(TError code, Throwable cause)
-
createException
protected final NodeThrewException createException(TError code, Throwable cause, Consumer<IRecordValueBuilder> errorData)
-
createExceptionWithData
protected final NodeThrewException createExceptionWithData(TError code, Throwable cause, Object errorData)
-
ec
protected final IEntityContext ec()
-
formRecord
protected final Vorgang formRecord()
-
getCombinedFileName
protected final String getCombinedFileName(List<IResolvedFile> files, String defaultFileName, String extension)
- Parameters:
files
- File names to combine.defaultFileName
- Default file name to use.extension
- Extension of the combined file name.- Returns:
- A file name with the given extension. When there is exactly one input file, the name of that file is taken, otherwise the default file name is used.
-
locale
protected final Locale locale()
-
project
protected final Projekt project()
-
-