Package com.avoka.fc.core.service
Class EmbeddedAttachment
- java.lang.Object
-
- com.avoka.fc.core.service.EmbeddedAttachment
-
- All Implemented Interfaces:
Serializable
public class EmbeddedAttachment extends Object implements Serializable
Provides a Embedded Attachment value object that can be serialised via the network.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmbeddedAttachment(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
Return the file content type (mime type).byte[]
getFileBytes()
Return the file byte array.String
getFilename()
Return the file name.String
getUploadType()
Return the upload type (one ofFileUpload.TYPE_EMBEDDED
,FileUpload.TYPE_SUBMITTED_FORM
orFileUpload.TYPE_SIGNED_RECEIPT
)boolean
isPDFForm()
Return whether it is a PDF form.boolean
isSignedReceipt()
Return whether it is a signed receipt uploaded by the user.
-
-
-
Constructor Detail
-
EmbeddedAttachment
public EmbeddedAttachment(String filename, byte[] fileBytes, String contentType, String uploadType)
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_SIGNED_RECEIPT
-
-
Method Detail
-
getFilename
public String getFilename()
Return the file name.- Returns:
- file name
-
getFileBytes
public byte[] getFileBytes()
Return the file byte array.- Returns:
- the file byte array
-
getContentType
public String getContentType()
Return the file content type (mime type).- Returns:
- the file content type
-
getUploadType
public String getUploadType()
Return the upload type (one ofFileUpload.TYPE_EMBEDDED
,FileUpload.TYPE_SUBMITTED_FORM
orFileUpload.TYPE_SIGNED_RECEIPT
)- Returns:
- the upload type
-
isPDFForm
public boolean isPDFForm()
Return whether it is a PDF form.- Returns:
- true if it is a PDF form
-
isSignedReceipt
public boolean isSignedReceipt()
Return whether it is a signed receipt uploaded by the user.- Returns:
- true if it is a signed receipt uploaded by the user
-
-