|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.pages.DelegatorAttachmentManager
public class DelegatorAttachmentManager
| Constructor Summary | |
|---|---|
DelegatorAttachmentManager()
|
|
| Method Summary | |
|---|---|
List |
getAllVersions(Attachment attachment)
Get all versions of an attachment, starting with the current version |
Attachment |
getAttachment(ContentEntityObject content,
String attachmentFileName)
Get the most recent version of an attachment with a given name for a particular page |
Attachment |
getAttachment(ContentEntityObject content,
String attachmentFileName,
int version)
Retrieve a named attachment from a page |
AttachmentDao |
getAttachmentDao()
Retrieves the AttachmentDao for the AttachmentManager |
InputStream |
getAttachmentData(Attachment attachment)
Retrieve the data for attachment |
AttachmentManager |
getAttachmentManager()
Return the AttachmentManager implementation that the delegator wraps |
List |
getAttachments(ContentEntityObject content)
Returns a list of all attachments, old and new. |
List |
getAttachments(ListQuery query,
int firstResult)
|
AttachmentDao.AttachmentCopier |
getCopier(AttachmentManager destination)
Retrieves a AttachmentDao.AttachmentCopier that will allow the attachments from one data store to be copied across to another. |
List |
getLatestVersionsOfAttachments(ContentEntityObject content)
b Returns a list of only latest versions of attachments. |
AttachmentDao.AttachmentMigrator |
getMigrator(AttachmentManager destination)
Retrieves a AttachmentDao.AttachmentMigrator that will allow the attachments from one data store to be moved across to another. |
List |
getPreviousVersions(Attachment attachment)
Get all non-current versions of an attachment, not including the current version. |
void |
moveAttachment(Attachment attachment,
String newFileName,
ContentEntityObject newName)
|
void |
removeAttachmentFromServer(Attachment attachment)
Removes an Attachment and its data from the server and data store |
void |
removeAttachments(List attachments)
Removes the contents of attachments from the server |
void |
saveAttachment(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
Saves an Attachment and its data |
void |
setAttachmentData(Attachment attachment,
InputStream attachmentData)
Set the data belonging to attachment This method can be used when there is missing data for an Attachment (e.g. |
void |
setBootstrapManager(BootstrapManager bootstrapManager)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatorAttachmentManager()
| Method Detail |
|---|
public AttachmentManager getAttachmentManager()
DelegatingAttachmentManager
getAttachmentManager in interface DelegatingAttachmentManagerpublic List getAttachments(ContentEntityObject content)
AttachmentManager
getAttachments in interface AttachmentManager
public List getAttachments(ListQuery query,
int firstResult)
getAttachments in interface AttachmentManagerpublic List getLatestVersionsOfAttachments(ContentEntityObject content)
AttachmentManager
getLatestVersionsOfAttachments in interface AttachmentManager
public Attachment getAttachment(ContentEntityObject content,
String attachmentFileName,
int version)
AttachmentManager
getAttachment in interface AttachmentManagercontent - the page the attachment is attached toattachmentFileName - the filename of the attachment to retrieveversion - the version of the attachment to retrieve. If you provide a version of 0
or less, you'll get the most recent version, but you should probably use
#getAttachment(AbstractPage, String) instead for that purpose instead
public Attachment getAttachment(ContentEntityObject content,
String attachmentFileName)
AttachmentManager
getAttachment in interface AttachmentManagercontent - the page the attachment is attached toattachmentFileName - the filename of the attachment to be retrieved
public InputStream getAttachmentData(Attachment attachment)
AttachmentManager
getAttachmentData in interface AttachmentManagerattachment - the Attachment the data belongs to
public void removeAttachmentFromServer(Attachment attachment)
AttachmentManager
removeAttachmentFromServer in interface AttachmentManagerattachment - the Attachment to remove
public void saveAttachment(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
throws IOException
AttachmentManager
saveAttachment in interface AttachmentManagerattachment - the modified version of the AttachmentpreviousVersion - the original version of the Attachment (null if new)attachmentData - an InputStream representing the data of the Attachment
IOException
public void setAttachmentData(Attachment attachment,
InputStream attachmentData)
throws AttachmentDataExistsException
AttachmentManager
setAttachmentData in interface AttachmentManagerattachment - Attachment the data belongs toattachmentData - the data to be saved
AttachmentDataExistsException - if data for attachment already exists
public void moveAttachment(Attachment attachment,
String newFileName,
ContentEntityObject newName)
moveAttachment in interface AttachmentManagerattachment - The attachment to be movednewFileName - New name of the filenewName - The new contentEntiityObject which will be parent to the attachmentpublic List getAllVersions(Attachment attachment)
AttachmentManager
getAllVersions in interface AttachmentManagerpublic List getPreviousVersions(Attachment attachment)
AttachmentManager
getPreviousVersions in interface AttachmentManagerattachment - the attachment to get all non-current versions for.public void setBootstrapManager(BootstrapManager bootstrapManager)
public void removeAttachments(List attachments)
AttachmentManager
removeAttachments in interface AttachmentManagerattachments - a List of AttachmentsAttachmentManager.removeAttachmentFromServer(Attachment)public AttachmentDao.AttachmentMigrator getMigrator(AttachmentManager destination)
AttachmentManager
getMigrator in interface AttachmentManagerdestination - the AttachmentManager the data is being moved to
public AttachmentDao.AttachmentCopier getCopier(AttachmentManager destination)
AttachmentManager
getCopier in interface AttachmentManagerdestination - the AttachmentManager the data is being copied to
public AttachmentDao getAttachmentDao()
AttachmentManager
getAttachmentDao in interface AttachmentManagerpublic void setSettingsManager(SettingsManager settingsManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||