Package com.avoka.fc.core.entity
Class FileUpload
java.lang.Object
org.apache.cayenne.PersistentObject
org.apache.cayenne.BaseDataObject
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
Provides an entity containing information about a file uploaded to SmartForm Manager.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIndicates that the file was submitted as an embedded attachmentstatic final StringIndicates that the file is the submitted PDF formstatic final StringIndicates that the file is system added file attachment.static final StringIndicates that the file has been uploaded by the user as a SmartForm Manager managed attachmentProvides a list of available type.static final StringIndicates that the file was virus scanned and found to be cleanstatic final StringIndicates that the file could not be virus scanned as no file data was availablestatic final StringIndicates that virus scanning did not complete due to an errorstatic final StringIndicates that the file was virus scanned and found to be contain a virusFields 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_PROPERTYFields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTYFields inherited from class org.apache.cayenne.CayenneDataObject
valuesFields inherited from class org.apache.cayenne.BaseDataObject
snapshotVersionFields inherited from class org.apache.cayenne.PersistentObject
objectContext, objectId, persistenceStateFields inherited from interface org.apache.cayenne.DataObject
DEFAULT_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Return the file size as a formatted stringbooleanDetermine whether the file was submitted as an embedded attachmentbooleanDetermine whether the file is the submitted PDF formbooleanDetermine whether the file was uploaded by the user for a SmartForm Manager managed attachmentbooleanDetermine whether the file has been found to be clean by the virus scannerbooleanbooleanDetermine whether the file has been found to be infected by the virus scannervoidsetDeletedTimestamp(Date deletedTimestamp) Set the deletedTimestamp value.voidsetFileUploadData(FileUploadData fileUploadData) Deprecated.voidsetUploadTimestamp(Date uploadTimestamp) Set the uploadTimestamp value.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, setDeliveryStatus, setDescription, setFileDataHash, setFileName, setSize, setStorageEncoding, setStorageServiceOid, setStorageUrl, setSubmission, setType, setUser, setVirusStatusMethods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId, toStringMethods inherited from class org.apache.cayenne.CayenneDataObject
makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeStateMethods inherited from class org.apache.cayenne.BaseDataObject
addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerializedMethods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cayenne.Persistent
getObjectContext, getObjectId, getPersistenceState, setObjectContext, setObjectId, setPersistenceState
-
Field Details
-
TYPE_EMBEDDED
Indicates that the file was submitted as an embedded attachment- See Also:
-
TYPE_SUBMITTED_FORM
Indicates that the file is the submitted PDF form- See Also:
-
TYPE_SYSTEM
Indicates that the file is system added file attachment.- See Also:
-
TYPE_UPLOAD
Indicates that the file has been uploaded by the user as a SmartForm Manager managed attachment- See Also:
-
TYPES
Provides a list of available type. -
VIRUS_STATUS_SCAN_ERROR
Indicates that virus scanning did not complete due to an error- See Also:
-
VIRUS_STATUS_CLEAN
Indicates that the file was virus scanned and found to be clean- See Also:
-
VIRUS_STATUS_VIRUS
Indicates that the file was virus scanned and found to be contain a virus- See Also:
-
VIRUS_STATUS_NO_DATA
Indicates that the file could not be virus scanned as no file data was available- See Also:
-
-
Constructor Details
-
FileUpload
public FileUpload()
-
-
Method Details
-
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.This method should not be used, instead please use the submissions associated Submission Data Storage service.- Overrides:
setFileUploadDatain class_FileUpload- Parameters:
fileUploadData- the fileUploadData value to set- Since:
- 4.2.0
-
getFileUploadData
Deprecated.This method should not be used, instead please use the submissions associated Submission Data Storage service.- Overrides:
getFileUploadDatain class_FileUpload- Returns:
- the fileUploadData value
- Since:
- 4.2.0
-
getSafeFileName
- Returns:
- a safe filename with illegal Windows OS characters and URL characters replaced with '_' character
- Since:
- 4.3.0
-
setUploadTimestamp
Description copied from class:_FileUploadSet the uploadTimestamp value.- Overrides:
setUploadTimestampin class_FileUpload- Parameters:
uploadTimestamp- the uploadTimestamp value to set
-
setDeletedTimestamp
Description copied from class:_FileUploadSet the deletedTimestamp value.- Overrides:
setDeletedTimestampin class_FileUpload- Parameters:
deletedTimestamp- the deletedTimestamp value to set
-