public class DefaultAttachmentStore extends AttachmentStore
POLICY_EXT_STORAGE, POLICY_MEM_BUFFER| Constructor and Description |
|---|
DefaultAttachmentStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Cleans up the attachment store.
|
void |
deleteAttachments(java.lang.String uniqueId)
Delete the attachment from file system if is
FileAttachment and from
AttachmentStore. |
boolean |
isAvailable(java.lang.String uniqueId,
java.lang.String cid)
Returns true if attachment is available.
|
void |
prepareForAttachments(java.lang.String uniqueId)
Prepares the attachment map for the new attachments with given uniqueId.
|
IncomingAttachment |
resolve(java.lang.String uniqueId,
java.lang.String cid,
long timeToWait)
Resolves an attachment by uniqueId and cid.
|
void |
store(java.lang.String uniqueId,
java.lang.String cid,
boolean isStreamingType,
ContentType contentType,
java.io.InputStream from)
Stores an attachment by uniqueId and cid.
|
getAttachmentPathPrefix, getInstance, getStorePolicy, setAttachmentPathPrefix, setStorePolicypublic void store(java.lang.String uniqueId,
java.lang.String cid,
boolean isStreamingType,
ContentType contentType,
java.io.InputStream from)
AttachmentStorestore in class AttachmentStorepublic boolean isAvailable(java.lang.String uniqueId,
java.lang.String cid)
AttachmentStoreisAvailable in class AttachmentStorepublic IncomingAttachment resolve(java.lang.String uniqueId, java.lang.String cid, long timeToWait) throws AttachmentException
AttachmentStoreresolve in class AttachmentStoreAttachmentExceptionpublic void cleanup()
AttachmentStorecleanup in class AttachmentStorepublic void deleteAttachments(java.lang.String uniqueId)
AttachmentStoreFileAttachment and from
AttachmentStore.deleteAttachments in class AttachmentStorepublic void prepareForAttachments(java.lang.String uniqueId)
AttachmentStoreprepareForAttachments in class AttachmentStore