|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AttachmentDataDao
This interface defines the methods for classes acting as a DAO at the level of data storage for Attachments.
| Method Summary | |
|---|---|
void |
afterMigrationFrom()
Perform any tasks necessary after Attachment data has been moved from this data store to another. |
InputStream |
getDataForAttachment(Attachment attachment)
Grabs the AttachmentData object for an Attachment |
void |
moveAttachment(Attachment attachment,
Attachment oldAttachment,
ContentEntityObject newContent)
Moves an attachment to a new file name or content object |
void |
prepareForMigrationTo()
Prepare the data store for a migration from another type of data store. |
void |
removeDataForAttachment(Attachment attachment,
ContentEntityObject originalContent)
Removes all attachment data for an attachment |
void |
replaceDataForAttachment(Attachment attachment,
InputStream data)
Sets the data for attachment This method will overwrite any existing data for the attachment. |
void |
saveDataForAttachment(Attachment attachment,
InputStream data)
Saves data to the attachment data store |
void |
saveDataForAttachmentVersion(Attachment attachment,
Attachment previousVersion,
InputStream data)
Saves data to the attachment data store, for an attachment that has been updated. |
| Method Detail |
|---|
InputStream getDataForAttachment(Attachment attachment)
throws AttachmentDataNotFoundException
attachment - the Attachment representing the data
IllegalArgumentException - if attachment is null
AttachmentDataNotFoundException - if no data was found
void removeDataForAttachment(Attachment attachment,
ContentEntityObject originalContent)
attachment - The attachment for which data should be removedoriginalContent - The content the attachment belongs to
IllegalArgumentException - if attachment is null
void saveDataForAttachment(Attachment attachment,
InputStream data)
attachment - the Attachment the data belongs todata - the InputStream to be written
IllegalArgumentException - if attachment is null
IllegalArgumentException - if data is null
void saveDataForAttachmentVersion(Attachment attachment,
Attachment previousVersion,
InputStream data)
attachment - the new version of the attachmentpreviousVersion - the previous version of the attachmentdata - the InputStream representing the data
void replaceDataForAttachment(Attachment attachment,
InputStream data)
attachment - Attachment the data belongs todata - the data to be saved
void moveAttachment(Attachment attachment,
Attachment oldAttachment,
ContentEntityObject newContent)
attachment - the Attachment to be movedoldAttachment - the original version of the attachmentnewContent - the new content the Attachment belongs to
IllegalArgumentException - if attachment is null
IllegalArgumentException - if newFileName is null
IllegalArgumentException - if newContent is nullvoid prepareForMigrationTo()
RuntimeException - if there was a problemvoid afterMigrationFrom()
RuntimeException - if there was a problem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||