|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.pages.AbstractAttachmentManager
Constructor Summary | |
AbstractAttachmentManager()
|
Method Summary | |
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 |
List |
getPreviousVersions(Attachment attachment)
Get all non-current versions of an attachment, not including the current version. |
ThumbnailManager |
getThumbnailManager()
|
void |
removeAttachments(List attachments)
Removes the contents of attachments from the server |
protected void |
removeThumbnail(Attachment attachment)
|
void |
saveAttachment(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
Saves an Attachment and its data |
protected abstract void |
saveNewAttachment(Attachment attachment,
InputStream attachmentData)
|
protected abstract void |
saveNewAttachmentVersion(Attachment attachment,
Attachment previousVersion,
InputStream attachmentData)
|
void |
setThumbnailManager(ThumbnailManager thumbnailManager)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.pages.AttachmentManager |
getAllVersions, getAttachmentDao, getAttachmentData, getAttachments, getAttachments, getCopier, getLatestVersionsOfAttachments, getMigrator, moveAttachment, removeAttachmentFromServer, setAttachmentData |
Constructor Detail |
public AbstractAttachmentManager()
Method Detail |
public Attachment getAttachment(ContentEntityObject content, String attachmentFileName)
getAttachment
in interface AttachmentManager
content
- the page the attachment is attached toattachmentFileName
- the filename of the attachment to be retrieved
public Attachment getAttachment(ContentEntityObject content, String attachmentFileName, int version)
getAttachment
in interface AttachmentManager
content
- 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 void saveAttachment(Attachment attachment, Attachment previousVersion, InputStream attachmentData) throws IOException
AttachmentManager
saveAttachment
in interface AttachmentManager
attachment
- 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
protected void removeThumbnail(Attachment attachment)
public ThumbnailManager getThumbnailManager()
public void setThumbnailManager(ThumbnailManager thumbnailManager)
protected abstract void saveNewAttachment(Attachment attachment, InputStream attachmentData) throws IOException
IOException
protected abstract void saveNewAttachmentVersion(Attachment attachment, Attachment previousVersion, InputStream attachmentData) throws IOException
IOException
public void removeAttachments(List attachments)
AttachmentManager
removeAttachments
in interface AttachmentManager
attachments
- a List of AttachmentsAttachmentManager.removeAttachmentFromServer(Attachment)
public List getPreviousVersions(Attachment attachment)
AttachmentManager
getPreviousVersions
in interface AttachmentManager
attachment
- the attachment to get all non-current versions for.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |