Class AttachmentPersistBuildData.Builder
java.lang.Object
de.xima.fc.mdl.attachment.AttachmentPersistBuildData.Builder
- Enclosing class:
AttachmentPersistBuildData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()fieldAvailableCheck(Function<String, Boolean> fieldAvailableCheck) formSubmissionUpdater(Function<Attachment, Boolean> formSubmissionUpdater) oldAttachmentsSupplier(Supplier<Map<String, List<Attachment>>> oldAttachments) requestParameterWrapper(ParameterWrapper parameters) uploadCreateHandler(AttachmentPersistBuildData.UploadCreateHandler uploadCreateHandler) uploadMergeHandler(AttachmentPersistBuildData.UploadMergeHandler uploadMergeHandler) Sets the map of validation errors to which new validation errors will be added during the build process.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
requestParameterWrapper
- Parameters:
parameters- wraps request parameters as the related uploads and other submitted values- Returns:
- This builder for chaining method calls.
-
oldAttachmentsSupplier
public AttachmentPersistBuildData.Builder oldAttachmentsSupplier(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 builder for chaining method calls.
-
userName
- Parameters:
userName- name of the user (or the anonymous pseudo user) who initiates this persist process- Returns:
- This builder for chaining method calls.
-
validationErrors
public AttachmentPersistBuildData.Builder validationErrors(Map<String, Map<Integer, List<String>>> validationErrors) Sets the map of validation errors to which new validation errors will be added during the build process.- Parameters:
validationErrors- Map of validation errors- Returns:
- This builder for chaining method calls.
-
fieldAvailableCheck
public AttachmentPersistBuildData.Builder fieldAvailableCheck(Function<String, Boolean> fieldAvailableCheck) - Parameters:
fieldAvailableCheck- checks whether a field with the provided name exists in the submitted form or not- Returns:
- this
-
formSubmissionUpdater
public AttachmentPersistBuildData.Builder formSubmissionUpdater(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
-
uploadMergeHandler
public AttachmentPersistBuildData.Builder uploadMergeHandler(AttachmentPersistBuildData.UploadMergeHandler uploadMergeHandler) - Parameters:
uploadMergeHandler- creates a new AttachmentPersistData instance for an already existing Attachment- Returns:
- this
-
uploadCreateHandler
public AttachmentPersistBuildData.Builder uploadCreateHandler(AttachmentPersistBuildData.UploadCreateHandler uploadCreateHandler) - Parameters:
uploadCreateHandler- creates a new AttachmentPersistData instance for a new Attachment- Returns:
- this
-
build
- Returns:
- a new AttachmentPersistBuildData instance describing which attachments are to persisted and which attachments are to be deleted.
-