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 Modifier Constructor Description protectedBaseBuilder(UUID uploadRequestUuid)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SelfaddFile(ISerializableFile file)Adds a file to the list of files to use for fulfilling the upload request.SelfattachmentSource(EAttachmentSource attachmentSource)Sets the source of the attachments to create.abstract Requestbuild()Creates the data needed to fulfill a pending upload request.protected IFulfillRequestedUploadRequestbuildBaseRequest()SelfenforceChat(UUID chatUuid)When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given chat UUID, i.e.SelfenforceExplicitContentType()SelfenforceExplicitContentType(boolean enforceExplicitContentType)SelfenforceMatchingUser()Enforces that the user fulfilling the request matches one of the chat members.SelfenforceMatchingUser(boolean enforceMatchingUser)Sets whether to enforce that the user fulfilling the request matches one of the chat members.SelfenforceMessage(UUID messageUuid)When given, enforces that theDefaultFulfillRequestedUploadRequest.uploadRequestUuid()matches the given message UUID, i.e.Selffiles(ISerializableFile... files)Sets the files to use for fulfilling the upload request.Selffiles(List<ISerializableFile> files)Sets the files to use for fulfilling the upload request.SelfinitializeResponse()Initializes all fields in the response entities.SelfinitializeResponse(boolean initializeResponse)Sets whether to initialize all fields in the response entities.SelfmakeFilesAccessibleToEndUser()Makes the newly created attachments accessible to the end user.SelfmakeFilesAccessibleToEndUser(boolean makeFilesAccessibleToEndUser)Sets whether to make the newly created attachments accessible to the end user.SelfoathKeeper(IUser oathKeeper)Sets the user who kept the oath by providing uploads to fulfill the request.protected abstract Selfself()
-
-
-
Constructor Detail
-
BaseBuilder
protected BaseBuilder(UUID uploadRequestUuid)
-
-
Method Detail
-
addFile
@CanIgnoreReturnValue public Self addFile(ISerializableFile file)
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
@CanIgnoreReturnValue public Self attachmentSource(EAttachmentSource 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
public abstract Request 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
@CanIgnoreReturnValue public Self enforceChat(UUID chatUuid)
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
@CanIgnoreReturnValue public Self enforceExplicitContentType()
-
enforceExplicitContentType
@CanIgnoreReturnValue public Self enforceExplicitContentType(boolean enforceExplicitContentType)
-
enforceMatchingUser
@CanIgnoreReturnValue public Self enforceMatchingUser()
Enforces that the user fulfilling the request matches one of the chat members.- Returns:
- This builder for chaining method calls.
-
enforceMatchingUser
@CanIgnoreReturnValue public Self enforceMatchingUser(boolean 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
@CanIgnoreReturnValue public Self enforceMessage(UUID messageUuid)
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
@CanIgnoreReturnValue public Self files(ISerializableFile... 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
@CanIgnoreReturnValue public Self files(List<ISerializableFile> 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
@CanIgnoreReturnValue public Self initializeResponse()
Initializes all fields in the response entities. Defaults to false.- Returns:
- This builder for chaining method calls.
-
initializeResponse
@CanIgnoreReturnValue public Self initializeResponse(boolean 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
@CanIgnoreReturnValue public Self 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
@CanIgnoreReturnValue public Self oathKeeper(IUser 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.
-
buildBaseRequest
protected IFulfillRequestedUploadRequest buildBaseRequest()
-
self
protected abstract Self self()
-
-