Package de.xima.fc.workflow.executor
Class FcSaveToWebDavExecutor
java.lang.Object
de.xima.fc.workflow.executor.FcSaveToWebDavExecutor
- All Implemented Interfaces:
IWorkflowActionExecutor
Handler for executing a workflow action of type
EWorkflowNodeType.FC_SAVE_TO_WEB_DAV- Since:
- 7.1.0
- Author:
- XIMA MEDIA GmbH
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IWorkflowExecutionContextprotected final IWorkflowExecutionEnvironmentDataprotected static final org.slf4j.Loggerprotected final WorkflowNodeprotected final INodeExecutionParams<FcSaveToWebDavProps>protected final FcSaveToWebDavProps -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new executor for executing a save to WebDAV action with the given params. -
Method Summary
Modifier and TypeMethodDescriptionprotected final List<Attachment>attachFilesToFormRecord(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File... files) protected final List<Attachment>attachFilesToFormRecord(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, File... files) Attaches the given files to the form record.protected final AttachmentattachFileToFormRecord(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File file) protected final AttachmentattachFileToFormRecord(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, File file) Attaches the given file to the form record.protected final Mandantclient()protected final <T> NodeThrewExceptionprotected final <T> NodeThrewExceptioncreateException(EFcSaveToWebDavError code, String message) protected final NodeThrewExceptioncreateException(EFcSaveToWebDavError code, String message, Throwable cause) protected final NodeThrewExceptioncreateException(EFcSaveToWebDavError code, String message, Throwable cause, Consumer<IRecordValueBuilder> errorData) protected final <T> NodeThrewExceptioncreateException(EFcSaveToWebDavError code, String message, Consumer<IRecordValueBuilder> errorData) protected final NodeThrewExceptioncreateException(EFcSaveToWebDavError code, Throwable cause) protected final NodeThrewExceptioncreateException(EFcSaveToWebDavError code, Throwable cause, Consumer<IRecordValueBuilder> errorData) protected final <T> NodeThrewExceptioncreateException(EFcSaveToWebDavError code, Consumer<IRecordValueBuilder> errorData) protected final NodeThrewExceptioncreateExceptionWithData(EFcSaveToWebDavError code, Throwable cause, Object errorData) protected final IEntityContextec()execute()Executes the workflow action, and creates the result.protected final Vorgangprotected final StringgetCombinedFileName(List<IResolvedFile> files, String defaultFileName, String extension) protected final Localelocale()protected final Projektproject()
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
ctx
-
env
-
node
-
params
-
props
-
-
Constructor Details
-
FcSaveToWebDavExecutor
Creates a new executor for executing a save to WebDAV action with the given params.- Parameters:
params- Parameters as provided the node handler, with the environment data and the action's properties model.
-
-
Method Details
-
execute
Description copied from interface:IWorkflowActionExecutorExecutes 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(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError 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(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError 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(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File... files) throws NodeThrewException - Throws:
NodeThrewException
-
attachFileToFormRecord
protected final Attachment attachFileToFormRecord(EFcSaveToWebDavError fileSystemError, EFcSaveToWebDavError databaseError, IAttachToFormRecordProviding attachToFormRecordProviding, File file) throws NodeThrewException - Throws:
NodeThrewException
-
client
-
createException
-
createException
protected final <T> NodeThrewException createException(EFcSaveToWebDavError code, Consumer<IRecordValueBuilder> errorData) -
createException
-
createException
protected final <T> NodeThrewException createException(EFcSaveToWebDavError code, String message, Consumer<IRecordValueBuilder> errorData) -
createException
protected final NodeThrewException createException(EFcSaveToWebDavError code, String message, Throwable cause) -
createException
protected final NodeThrewException createException(EFcSaveToWebDavError code, String message, Throwable cause, Consumer<IRecordValueBuilder> errorData) -
createException
-
createException
protected final NodeThrewException createException(EFcSaveToWebDavError code, Throwable cause, Consumer<IRecordValueBuilder> errorData) -
createExceptionWithData
protected final NodeThrewException createExceptionWithData(EFcSaveToWebDavError code, Throwable cause, Object errorData) -
ec
-
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
-
project
-