Package com.avoka.fc.core.entity
Class FileUpload
- java.lang.Object
-
- org.apache.cayenne.PersistentObject
-
- org.apache.cayenne.CayenneDataObject
-
- com.avoka.core.entity.BaseEntity
-
- com.avoka.fc.core.entity.auto._FileUpload
-
- com.avoka.fc.core.entity.FileUpload
-
- All Implemented Interfaces:
IEntity
,Serializable
,org.apache.cayenne.DataObject
,org.apache.cayenne.Persistent
,org.apache.cayenne.Validating
public class FileUpload extends _FileUpload
Provides an entity containing information about a file uploaded to SmartForm Manager.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE_EMBEDDED
Indicates that the file was submitted as an embedded attachmentstatic String
TYPE_SIGNED_RECEIPT
Indicates that the file is the receipt signed in wet ink by the userstatic String
TYPE_SUBMITTED_FORM
Indicates that the file is the submitted PDF formstatic String
TYPE_SYSTEM
Indicates that the file is system added file attachment.static String
TYPE_UPLOAD
Indicates that the file has been uploaded by the user as a SmartForm Manager managed attachmentstatic List<String>
TYPES
Provides a list of available type.static String
VIRUS_STATUS_CLEAN
Indicates that the file was virus scanned and found to be cleanstatic String
VIRUS_STATUS_NO_DATA
Indicates that the file could not be virus scanned as no file data was availablestatic String
VIRUS_STATUS_SCAN_ERROR
Indicates that virus scanning did not complete due to an errorstatic String
VIRUS_STATUS_VIRUS
Indicates that the file was virus scanned and found to be contain a virus-
Fields inherited from class com.avoka.fc.core.entity.auto._FileUpload
ATTACHMENTS, ATTACHMENTS_PROPERTY, CONTENT_TYPE, CONTENT_TYPE_PROPERTY, DELETED_BY, DELETED_BY_PROPERTY, DELETED_FLAG, DELETED_FLAG_PROPERTY, DELETED_TIMESTAMP, DELETED_TIMESTAMP_PROPERTY, DELIVERY_STATUS, DELIVERY_STATUS_PROPERTY, DESCRIPTION, DESCRIPTION_PROPERTY, FILE_DATA_HASH, FILE_DATA_HASH_PROPERTY, FILE_NAME, FILE_NAME_PROPERTY, FILE_UPLOAD_DATA, FILE_UPLOAD_DATA_PROPERTY, SIZE, SIZE_PROPERTY, STORAGE_ENCODING, STORAGE_ENCODING_PROPERTY, STORAGE_SERVICE_OID, STORAGE_SERVICE_OID_PROPERTY, STORAGE_URL, STORAGE_URL_PROPERTY, SUBMISSION, SUBMISSION_PROPERTY, TYPE, TYPE_PROPERTY, UPLOAD_OID_PK_COLUMN, UPLOAD_TIMESTAMP, UPLOAD_TIMESTAMP_PROPERTY, USER, USER_PROPERTY, VIRUS_STATUS, VIRUS_STATUS_PROPERTY
-
Fields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description FileUpload()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FileUploadData
getFileUploadData()
Deprecated.String
getSafeFileName()
String
getSizeFormatted()
Return the file size as a formatted stringboolean
isEmbedded()
Determine whether the file was submitted as an embedded attachmentboolean
isSubmittedForm()
Determine whether the file is the submitted PDF formboolean
isUploaded()
Determine whether the file was uploaded by the user for a SmartForm Manager managed attachmentboolean
isVirusStatusClean()
Determine whether the file has been found to be clean by the virus scannerboolean
isVirusStatusError()
boolean
isVirusStatusVirus()
Determine whether the file has been found to be infected by the virus scannervoid
setFileUploadData(FileUploadData fileUploadData)
Deprecated.-
Methods inherited from class com.avoka.fc.core.entity.auto._FileUpload
addToAttachments, getAttachments, getContentType, getDeletedBy, getDeletedTimestamp, getDeliveryStatus, getDescription, getFileDataHash, getFileName, getSize, getStorageEncoding, getStorageServiceOid, getStorageUrl, getSubmission, getType, getUploadTimestamp, getUser, getVirusStatus, isDeletedFlag, removeFromAttachments, setContentType, setDeletedBy, setDeletedFlag, setDeletedTimestamp, setDeliveryStatus, setDescription, setFileDataHash, setFileName, setSize, setStorageEncoding, setStorageServiceOid, setStorageUrl, setSubmission, setType, setUploadTimestamp, setUser, setVirusStatus
-
Methods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId, toString
-
Methods inherited from class org.apache.cayenne.CayenneDataObject
addToManyTarget, getSnapshotVersion, makePath, readNestedProperty, readProperty, readPropertyDirectly, removeToManyTarget, setObjectContext, setPersistenceState, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writePropertyDirectly
-
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
-
-
-
-
Field Detail
-
TYPE_EMBEDDED
public static final String TYPE_EMBEDDED
Indicates that the file was submitted as an embedded attachment- See Also:
- Constant Field Values
-
TYPE_SIGNED_RECEIPT
public static final String TYPE_SIGNED_RECEIPT
Indicates that the file is the receipt signed in wet ink by the user- See Also:
- Constant Field Values
-
TYPE_SUBMITTED_FORM
public static final String TYPE_SUBMITTED_FORM
Indicates that the file is the submitted PDF form- See Also:
- Constant Field Values
-
TYPE_SYSTEM
public static final String TYPE_SYSTEM
Indicates that the file is system added file attachment.- See Also:
- Constant Field Values
-
TYPE_UPLOAD
public static final String TYPE_UPLOAD
Indicates that the file has been uploaded by the user as a SmartForm Manager managed attachment- See Also:
- Constant Field Values
-
VIRUS_STATUS_SCAN_ERROR
public static final String VIRUS_STATUS_SCAN_ERROR
Indicates that virus scanning did not complete due to an error- See Also:
- Constant Field Values
-
VIRUS_STATUS_CLEAN
public static final String VIRUS_STATUS_CLEAN
Indicates that the file was virus scanned and found to be clean- See Also:
- Constant Field Values
-
VIRUS_STATUS_VIRUS
public static final String VIRUS_STATUS_VIRUS
Indicates that the file was virus scanned and found to be contain a virus- See Also:
- Constant Field Values
-
VIRUS_STATUS_NO_DATA
public static final String VIRUS_STATUS_NO_DATA
Indicates that the file could not be virus scanned as no file data was available- See Also:
- Constant Field Values
-
-
Method Detail
-
getSizeFormatted
public String getSizeFormatted()
Return the file size as a formatted string- Returns:
- the formatted file size
-
isUploaded
public boolean isUploaded()
Determine whether the file was uploaded by the user for a SmartForm Manager managed attachment- Returns:
- true if the type equals
TYPE_UPLOAD
-
isSubmittedForm
public boolean isSubmittedForm()
Determine whether the file is the submitted PDF form- Returns:
- true if the type equals
TYPE_SUBMITTED_FORM
-
isEmbedded
public boolean isEmbedded()
Determine whether the file was submitted as an embedded attachment- Returns:
- true if the type equals
TYPE_EMBEDDED
-
isVirusStatusClean
public boolean isVirusStatusClean()
Determine whether the file has been found to be clean by the virus scanner- Returns:
- true if the virus status is
VIRUS_STATUS_CLEAN
- Since:
- 4.1.0
-
isVirusStatusError
public boolean isVirusStatusError()
- Returns:
- true if the virus status is
VIRUS_STATUS_SCAN_ERROR
- Since:
- 4.3.2
-
isVirusStatusVirus
public boolean isVirusStatusVirus()
Determine whether the file has been found to be infected by the virus scanner- Returns:
- true if the virus status is
VIRUS_STATUS_VIRUS
- Since:
- 4.1.0
-
setFileUploadData
@Deprecated public void setFileUploadData(FileUploadData fileUploadData)
Deprecated.This method should not be used, instead please use the submissions associated Submission Data Storage service.- Overrides:
setFileUploadData
in class_FileUpload
- Parameters:
fileUploadData
- the fileUploadData value to set- Since:
- 4.2.0
-
getFileUploadData
@Deprecated public FileUploadData getFileUploadData()
Deprecated.This method should not be used, instead please use the submissions associated Submission Data Storage service.- Overrides:
getFileUploadData
in class_FileUpload
- Returns:
- the fileUploadData value
- Since:
- 4.2.0
-
getSafeFileName
public String getSafeFileName()
- Returns:
- a safe filename with illegal Windows OS characters and URL characters replaced with '_' character
- Since:
- 4.3.0
-
-