|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AttachmentDao
This interface defines the methods for classes acting as a DAO at the level of meta-data storage for Attachments.
| Nested Class Summary | |
|---|---|
static interface |
AttachmentDao.AttachmentCopier
|
static interface |
AttachmentDao.AttachmentMigrator
|
| Method Summary | |
|---|---|
void |
afterMigrationFrom()
Perform any tasks necessary after Attachment data has been moved from this data store to another. |
List |
findAll()
Retrieves the latest versions of all Attachments Use of this method is discouraged when there are a large amount of Attachments. |
List |
findAllVersions(Attachment attachment)
|
Iterator |
findLatestVersionsIterator()
Retrieves the latest versions of all Attachments and returns an Iterator to the results. |
List |
getAttachmentByQuery(ListQuery query,
int firstResult)
|
InputStream |
getAttachmentData(Attachment attachment)
Retrieves the InputStream representing the data for attachment |
AttachmentDao.AttachmentCopier |
getCopier(AttachmentDao destinationDao)
Get a copier object to copy attachments between data stores The source data store will remain untouched |
List |
getLatestVersionsOfAttachments(ContentEntityObject ceo)
Retrieves the latest versions of all attachments to ceo |
AttachmentDao.AttachmentMigrator |
getMigrator(AttachmentDao destinationDao)
Get a migrator object to migrate attachments between attachment datastores. |
void |
moveAttachment(Attachment attachment,
Attachment oldAttachment,
ContentEntityObject newContent)
Moves an Attachment to a new file name or content object This method assumes that the filename and/or content of the attachment (and its previous versions) have already been updated. |
void |
prepareForMigrationTo()
Prepare the data store for a migration from another type of data store. |
void |
removeAttachmentFromServer(Attachment attachment)
Removes attachment (and all of its versions) |
void |
replaceAttachmentData(Attachment attachment,
InputStream attachmentData)
Sets the attachment data for attachment This method will overwrite any existing data for the attachment version. |
void |
saveNewAttachment(Attachment attachment,
InputStream attachmentData)
Saves a new attachment |
void |
saveNewAttachmentVersion(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
Saves a new version of attachment |
| Method Detail |
|---|
List getLatestVersionsOfAttachments(ContentEntityObject ceo)
ceo - the content to look up attachments
List findAll()
findLatestVersionsIterator()Iterator findLatestVersionsIterator()
InputStream getAttachmentData(Attachment attachment)
throws AttachmentDataNotFoundException
attachment -
AttachmentDataNotFoundException - if the data could not be found
List getAttachmentByQuery(ListQuery query,
int firstResult)
void saveNewAttachment(Attachment attachment,
InputStream attachmentData)
attachment - the Attachment to be savedattachmentData - the attachment data to be saved
void saveNewAttachmentVersion(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
attachment - the Attachment to be savedpreviousVersion - the previous version of the AttachmentattachmentData - the attachment data to be saved
void moveAttachment(Attachment attachment,
Attachment oldAttachment,
ContentEntityObject newContent)
attachment - the Attachment to be movedoldAttachment - the Attachment before it has been updatednewContent - the new content attachment belongs to
IllegalArgumentException - if attachment is not the latest versionvoid removeAttachmentFromServer(Attachment attachment)
attachment - the Attachment to be removed
void replaceAttachmentData(Attachment attachment,
InputStream attachmentData)
attachment - Attachment the data belongs toattachmentData - the data to saveAttachmentDao.AttachmentMigrator getMigrator(AttachmentDao destinationDao)
destinationDao - dao to move attachments to
AttachmentDao.AttachmentCopier getCopier(AttachmentDao destinationDao)
destinationDao - dao to copy attachments to
void prepareForMigrationTo()
RuntimeException - if there was a problemvoid afterMigrationFrom()
RuntimeException - if there was a problemList findAllVersions(Attachment attachment)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||