Package com.avoka.fc.core.service
Class EmbeddedAttachment
java.lang.Object
com.avoka.fc.core.service.EmbeddedAttachment
- All Implemented Interfaces:
Serializable
Provides a Embedded Attachment value object that can be serialised via the network.
- See Also:
-
Constructor Summary
ConstructorDescriptionEmbeddedAttachment
(String filename, byte[] fileBytes, String contentType, String uploadType) Create an embedded attachment given the filename, file byte array and the pdf form flag. -
Method Summary
Modifier and TypeMethodDescriptionReturn the file content type (mime type).byte[]
Return the file byte array.Return the file name.Return the upload type (one ofFileUpload.TYPE_EMBEDDED
,FileUpload.TYPE_SUBMITTED_FORM
orFileUpload.TYPE_UPLOAD
)boolean
Return whether it is a PDF form.
-
Constructor Details
-
EmbeddedAttachment
Create an embedded attachment given the filename, file byte array and the pdf form flag.- Parameters:
filename
- file namefileBytes
- file byte arraycontentType
- the file content type (mime-type)uploadType
- one ofFileUpload.TYPE_EMBEDDED
,FileUpload.TYPE_SUBMITTED_FORM
orFileUpload.TYPE_UPLOAD
-
-
Method Details
-
getFilename
Return the file name.- Returns:
- file name
-
getFileBytes
public byte[] getFileBytes()Return the file byte array.- Returns:
- the file byte array
-
getContentType
Return the file content type (mime type).- Returns:
- the file content type
-
getUploadType
Return the upload type (one ofFileUpload.TYPE_EMBEDDED
,FileUpload.TYPE_SUBMITTED_FORM
orFileUpload.TYPE_UPLOAD
)- Returns:
- the upload type
-
isPDFForm
public boolean isPDFForm()Return whether it is a PDF form.- Returns:
- true if it is a PDF form
-