|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AttachmentService
Defines the methods common to all AttachmentService implementations
| Method Summary | |
|---|---|
Attachment |
createAttachment(PersistableBusinessObject parent,
String uploadedFileName,
String mimeType,
int fileSize,
InputStream fileContents,
String attachmentType)
Stores the given fileContents and returns referring Attachment object whieh acts as a momento to the archived object. |
void |
deleteAttachmentContents(Attachment attachment)
Deletes a given DocumentAttachment contents from the corresponding Attachment object |
void |
deletePendingAttachmentsModifiedBefore(long modificationTime)
Deletes pending attachments that were last modified before the given time. |
Attachment |
getAttachmentByNoteId(Long noteId)
|
void |
moveAttachmentWherePending(Note note)
Moves attachments on notes from the pending directory to the real one |
InputStream |
retrieveAttachmentContents(Attachment attachment)
Retrieves a given Attachments contents from the corresponding Attachment object |
| Method Detail |
|---|
Attachment createAttachment(PersistableBusinessObject parent,
String uploadedFileName,
String mimeType,
int fileSize,
InputStream fileContents,
String attachmentType)
throws IOException
document - TODOfoo -
IOException
InputStream retrieveAttachmentContents(Attachment attachment)
throws IOException
documentAttachment -
IOExceptionvoid deleteAttachmentContents(Attachment attachment)
documentAttachment - void moveAttachmentWherePending(Note note)
note - the Note from which to move attachments. If this Note does not
have an attachment then this method does nothing.
IllegalArgumentException - if the given Note is null
IllegalArgumentException - if the Note does not have a valid object idvoid deletePendingAttachmentsModifiedBefore(long modificationTime)
modificationTime - the number of milliseconds since "the epoch" (i.e.January 1, 1970, 00:00:00 GMT). java.util.Date and java.util.Calendar's
methods return time in this format. If a pending attachment was modified before this time, then it will be deleted (unless an error occurs)Attachment getAttachmentByNoteId(Long noteId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||