Class DefaultFulfillRequestedUploadRequest.BaseBuilder<Request, Self extends DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,Self> >
java.lang.Object
de.xima.fc.common.form_record.chat.DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,Self>
- Direct Known Subclasses:
DefaultExtendedFulfillRequestedUploadRequest.Builder, DefaultFulfillRequestedUploadRequest.Builder
- Enclosing class:
DefaultFulfillRequestedUploadRequest
public abstract static class DefaultFulfillRequestedUploadRequest.BaseBuilder<Request, Self extends DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,Self>>
extends Object
Builder for the data needed to fulfill a pending upload request.
- Since:
- 8.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFile(ISerializableFile file) Adds a file to the list of files to use for fulfilling the upload request.attachmentSource(EAttachmentSource attachmentSource) Sets the source of the attachments to create.abstract Requestbuild()Creates the data needed to fulfill a pending upload request.protected IFulfillRequestedUploadRequestenforceChat(UUID chatUuid) When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given chat UUID, i.e. that the chat contains the upload request.enforceExplicitContentType(boolean enforceExplicitContentType) Enforces that the user fulfilling the request matches one of the chat members.enforceMatchingUser(boolean enforceMatchingUser) Sets whether to enforce that the user fulfilling the request matches one of the chat members.enforceMessage(UUID messageUuid) When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given message UUID, i.e. that the message contains the upload request.files(ISerializableFile... files) Sets the files to use for fulfilling the upload request.files(List<ISerializableFile> files) Sets the files to use for fulfilling the upload request.Initializes all fields in the response entities.initializeResponse(boolean initializeResponse) Sets whether to initialize all fields in the response entities.Sets the locale to use for the request.Makes the newly created attachments accessible to the end user.makeFilesAccessibleToEndUser(boolean makeFilesAccessibleToEndUser) Sets whether to make the newly created attachments accessible to the end user.oathKeeper(IUser oathKeeper) Sets the user who kept the oath by providing uploads to fulfill the request.protected abstract Selfself()
-
Constructor Details
-
BaseBuilder
-
-
Method Details
-
addFile
Adds a file to the list of files to use for fulfilling the upload request.- Parameters:
file- The file to add to the list of files to use for fulfilling the upload request.- Returns:
- This builder for chaining method calls.
-
attachmentSource
Sets the source of the attachments to create. Applies only when the upload request does not reference an upload element (in which case the source is always set toFORM_UPLOAD). Defaults toUNKNOWN.- Parameters:
attachmentSource- The source of the attachments to create.- Returns:
- This builder for chaining method calls.
-
build
Creates the data needed to fulfill a pending upload request. Any modifications to the builder will not affect the built request.- Returns:
- The data needed to fulfill a pending upload request.
-
enforceChat
When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given chat UUID, i.e. that the chat contains the upload request.- Parameters:
chatUuid- The UUID of the message to enforce.- Returns:
- This builder for chaining method calls.
-
enforceExplicitContentType
-
enforceExplicitContentType
-
enforceMatchingUser
Enforces that the user fulfilling the request matches one of the chat members.- Returns:
- This builder for chaining method calls.
-
enforceMatchingUser
Sets whether to enforce that the user fulfilling the request matches one of the chat members.- Parameters:
enforceMatchingUser- Whether to enforce that the user fulfilling the request matches one of the chat members.- Returns:
- This builder for chaining method calls.
-
enforceMessage
When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given message UUID, i.e. that the message contains the upload request.- Parameters:
messageUuid- The UUID of the message to enforce.- Returns:
- This builder for chaining method calls.
-
files
Sets the files to use for fulfilling the upload request.- Parameters:
files- The files to use for fulfilling the upload request.- Returns:
- This builder for chaining method calls.
-
files
Sets the files to use for fulfilling the upload request.- Parameters:
files- The files to use for fulfilling the upload request.- Returns:
- This builder for chaining method calls.
-
initializeResponse
Initializes all fields in the response entities. Defaults to false.- Returns:
- This builder for chaining method calls.
-
initializeResponse
Sets whether to initialize all fields in the response entities. Defaults to false.- Parameters:
initializeResponse- Whether to initialize all fields in the response entities.- Returns:
- This builder for chaining method calls.
-
makeFilesAccessibleToEndUser
Makes the newly created attachments accessible to the end user. Defaults to false.- Returns:
- This builder for chaining method calls.
-
makeFilesAccessibleToEndUser
@CanIgnoreReturnValue public Self makeFilesAccessibleToEndUser(boolean makeFilesAccessibleToEndUser) Sets whether to make the newly created attachments accessible to the end user. Defaults to false.- Parameters:
makeFilesAccessibleToEndUser- Whether to make the newly created attachments accessible to the end user.- Returns:
- This builder for chaining method calls.
-
oathKeeper
Sets the user who kept the oath by providing uploads to fulfill the request. Optional, but required ifenforceMatchingUseris set to true.- Parameters:
oathKeeper- The user who provided the upload to fulfill the request.- Returns:
- This builder for chaining method calls.
-
locale
-
buildBaseRequest
-
self
-