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
Modifier and TypeFieldDescriptionstatic final String
Indicates that the file was submitted as an embedded attachmentstatic final String
Indicates that the file is the submitted PDF formstatic final String
Indicates that the file is system added file attachment.static final String
Indicates that the file has been uploaded by the user as a SmartForm Manager managed attachmentProvides a list of available type.static final String
Indicates that the file was virus scanned and found to be cleanstatic final String
Indicates that the file could not be virus scanned as no file data was availablestatic final String
Indicates that virus scanning did not complete due to an errorstatic final String
Indicates 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_PROPERTY
Fields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTY
Fields inherited from class org.apache.cayenne.CayenneDataObject
values
Fields inherited from class org.apache.cayenne.BaseDataObject
snapshotVersion
Fields inherited from class org.apache.cayenne.PersistentObject
objectContext, objectId, persistenceState
Fields inherited from interface org.apache.cayenne.DataObject
DEFAULT_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Return the file size as a formatted stringboolean
Determine whether the file was submitted as an embedded attachmentboolean
Determine whether the file is the submitted PDF formboolean
Determine whether the file was uploaded by the user for a SmartForm Manager managed attachmentboolean
Determine whether the file has been found to be clean by the virus scannerboolean
boolean
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
makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeState
Methods 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, writeSerialized
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
setFileUploadData
in 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:
getFileUploadData
in 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
-