Package de.xima.fc.mdl.attachment
Class AttachmentPersistBuildData.Builder
- java.lang.Object
-
- de.xima.fc.mdl.attachment.AttachmentPersistBuildData.Builder
-
- Enclosing class:
- AttachmentPersistBuildData
public static final class AttachmentPersistBuildData.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentPersistBuildData
build()
AttachmentPersistBuildData.Builder
setFieldAvailableCheck(Function<String,Boolean> fieldAvailableCheck)
AttachmentPersistBuildData.Builder
setFormSubmissionUpdater(Function<Attachment,Boolean> formSubmissionUpdater)
AttachmentPersistBuildData.Builder
setOldAttachmentsSupplier(Supplier<Map<String,List<Attachment>>> oldAttachments)
AttachmentPersistBuildData.Builder
setRequestParameterWrapper(ParameterWrapper parameters)
AttachmentPersistBuildData.Builder
setUploadCreateHandler(AttachmentPersistBuildData.UploadCreateHandler uploadCreateHandler)
AttachmentPersistBuildData.Builder
setUploadMergeHandler(AttachmentPersistBuildData.UploadMergeHandler uploadMergeHandler)
AttachmentPersistBuildData.Builder
setUserName(String userName)
-
-
-
Method Detail
-
setRequestParameterWrapper
public AttachmentPersistBuildData.Builder setRequestParameterWrapper(ParameterWrapper parameters)
- Parameters:
parameters
- wraps request parameters as the related uploads and other submitted values- Returns:
- this
-
setOldAttachmentsSupplier
public AttachmentPersistBuildData.Builder setOldAttachmentsSupplier(Supplier<Map<String,List<Attachment>>> oldAttachments)
- Parameters:
oldAttachments
- supplies a mapping of the UUIDs of the Vorgangs's old (i.e. current at this point) Attachments to (the list of) these old (current) Attachments- Returns:
- this
-
setUserName
public AttachmentPersistBuildData.Builder setUserName(String userName)
- Parameters:
userName
- name of the user (or the anonymous pseudo user) who initiates this persist process- Returns:
- this
-
setFieldAvailableCheck
public AttachmentPersistBuildData.Builder setFieldAvailableCheck(Function<String,Boolean> fieldAvailableCheck)
- Parameters:
fieldAvailableCheck
- checks whether a field with the provided name exists in the submitted form or not- Returns:
- this
-
setFormSubmissionUpdater
public AttachmentPersistBuildData.Builder setFormSubmissionUpdater(Function<Attachment,Boolean> formSubmissionUpdater)
- Parameters:
formSubmissionUpdater
- checks whether the provided Attachment's FormEingang property needs to be updated, and if so, performs the update (returning true if update was performed, false if not)- Returns:
- this
-
setUploadMergeHandler
public AttachmentPersistBuildData.Builder setUploadMergeHandler(AttachmentPersistBuildData.UploadMergeHandler uploadMergeHandler)
- Parameters:
uploadMergeHandler
- creates a new AttachmentPersistData instance for an already existing Attachment- Returns:
- this
-
setUploadCreateHandler
public AttachmentPersistBuildData.Builder setUploadCreateHandler(AttachmentPersistBuildData.UploadCreateHandler uploadCreateHandler)
- Parameters:
uploadCreateHandler
- creates a new AttachmentPersistData instance for a new Attachment- Returns:
- this
-
build
public AttachmentPersistBuildData build()
- Returns:
- a new AttachmentPersistBuildData instance describing which attachments are to persisted and which attachments are to be deleted.
-
-