Class DefaultFulfillRequestedUploadRequest
- java.lang.Object
-
- de.xima.fc.common.form_record.chat.DefaultFulfillRequestedUploadRequest
-
- All Implemented Interfaces:
IFulfillRequestedUploadRequest,Serializable
public final class DefaultFulfillRequestedUploadRequest extends Object implements IFulfillRequestedUploadRequest
Simple POJO implementation ofIFulfillRequestedUploadRequestwith a builder.- Since:
- 8.2.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultFulfillRequestedUploadRequest.BaseBuilder<Request,Self extends DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,Self>>Builder for the data needed to fulfill a pending upload request.static classDefaultFulfillRequestedUploadRequest.BuilderBuilder for anIFulfillRequestedUploadRequest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EAttachmentSourceattachmentSource()Applies only when theupload requestdoes not reference anupload element.UUIDenforceChatUuid()When given, enforces that theIFulfillRequestedUploadRequest.uploadRequestUuid()matches the given chat UUID, i.e.booleanenforceExplicitContentType()When true, enforces that thefileshave an explicit content type.booleanenforceMatchingUser()UUIDenforceMessageUuid()When given, enforces that theIFulfillRequestedUploadRequest.uploadRequestUuid()matches the given message UUID, i.e.List<ISerializableFile>files()The files to use for fulfilling the upload request.static DefaultFulfillRequestedUploadRequest.BuilderfulfillUploadRequestBuilder(FormRecordMessageUploadRequest uploadRequest)Creates a new builder for the data need to fulfill a pending upload request.static DefaultFulfillRequestedUploadRequest.BuilderfulfillUploadRequestBuilder(UUID uploadRequestUuid)Creates a new builder for the data need to fulfill a pending upload request.booleaninitializeResponse()When true, initializes all fields in the response entities (i.e.booleanmakeFilesAccessibleToEndUser()Whether to make the newly created attachments accessible to the end user.IUseroathKeeper()The user who provided the upload to fulfill the request.UUIDuploadRequestUuid()The UUID of apendingupload request.
-
-
-
Method Detail
-
attachmentSource
public EAttachmentSource attachmentSource()
Description copied from interface:IFulfillRequestedUploadRequestApplies only when theupload requestdoes not reference anupload element. Thesourceof the attachments to create. Defaults toUNKNOWN. Note that when the upload request references an upload element, the source is always set toFORM_UPLOAD.- Specified by:
attachmentSourcein interfaceIFulfillRequestedUploadRequest- Returns:
- The source of the attachments to create.
-
enforceChatUuid
public UUID enforceChatUuid()
Description copied from interface:IFulfillRequestedUploadRequestWhen given, enforces that theIFulfillRequestedUploadRequest.uploadRequestUuid()matches the given chat UUID, i.e. that the chat contains the upload request.- Specified by:
enforceChatUuidin interfaceIFulfillRequestedUploadRequest- Returns:
- The UUID of the message to enforce.
-
enforceExplicitContentType
public boolean enforceExplicitContentType()
Description copied from interface:IFulfillRequestedUploadRequestWhen true, enforces that thefileshave an explicit content type. Defaults to false.- Specified by:
enforceExplicitContentTypein interfaceIFulfillRequestedUploadRequest- Returns:
- Whether to enforce that the files have an explicit content type.
-
enforceMatchingUser
public boolean enforceMatchingUser()
Description copied from interface:IFulfillRequestedUploadRequestWhen true, enforces that theuserfulfilling the request matches one ofmembersof the chat containing the message with the upload request. Defaults to false.- Specified by:
enforceMatchingUserin interfaceIFulfillRequestedUploadRequest- Returns:
- When true, enforces that the user fulfilling the request matches one of the chat members.
-
enforceMessageUuid
public UUID enforceMessageUuid()
Description copied from interface:IFulfillRequestedUploadRequestWhen given, enforces that theIFulfillRequestedUploadRequest.uploadRequestUuid()matches the given message UUID, i.e. that the message contains the upload request.- Specified by:
enforceMessageUuidin interfaceIFulfillRequestedUploadRequest- Returns:
- The UUID of the message to enforce.
-
files
public List<ISerializableFile> files()
Description copied from interface:IFulfillRequestedUploadRequestThe files to use for fulfilling the upload request. When the files do not have an explicit content type, attempts to guess the type, unless an explicit content type isenforced.- Specified by:
filesin interfaceIFulfillRequestedUploadRequest- Returns:
- The files to use for fulfilling the upload request.
-
initializeResponse
public boolean initializeResponse()
Description copied from interface:IFulfillRequestedUploadRequestWhen true, initializes all fields in the response entities (i.e. ensures referenced child entities are loaded from the database). Defaults to false.- Specified by:
initializeResponsein interfaceIFulfillRequestedUploadRequest- Returns:
- When true, initializes all fields in the response entities.
-
makeFilesAccessibleToEndUser
public boolean makeFilesAccessibleToEndUser()
Description copied from interface:IFulfillRequestedUploadRequestWhether to make the newly created attachments accessible to the end user. Defaults to false.- Specified by:
makeFilesAccessibleToEndUserin interfaceIFulfillRequestedUploadRequest- Returns:
- Whether to make the newly created attachments accessible to the end user.
-
oathKeeper
public IUser oathKeeper()
Description copied from interface:IFulfillRequestedUploadRequestThe user who provided the upload to fulfill the request. Uses an (unspecified) default when not given.- Specified by:
oathKeeperin interfaceIFulfillRequestedUploadRequest- Returns:
- The user who provided the upload to fulfill the request.
-
uploadRequestUuid
public UUID uploadRequestUuid()
Description copied from interface:IFulfillRequestedUploadRequestThe UUID of apendingupload request. Since the UUID must be globally unique within the system, this is sufficient to identify the request.- Specified by:
uploadRequestUuidin interfaceIFulfillRequestedUploadRequest- Returns:
- The UUID of the upload request.
-
fulfillUploadRequestBuilder
public static DefaultFulfillRequestedUploadRequest.Builder fulfillUploadRequestBuilder(UUID uploadRequestUuid)
Creates a new builder for the data need to fulfill a pending upload request.- Parameters:
uploadRequestUuid- The UUID of the pending upload request.- Returns:
- A new builder for the data need to fulfill a pending upload request.
-
fulfillUploadRequestBuilder
public static DefaultFulfillRequestedUploadRequest.Builder fulfillUploadRequestBuilder(FormRecordMessageUploadRequest uploadRequest)
Creates a new builder for the data need to fulfill a pending upload request.- Parameters:
uploadRequest- The pending upload request.- Returns:
- A new builder for the data need to fulfill a pending upload request.
-
-