com.atlassian.confluence.pages.AttachmentManager |
Known Indirect Subclasses |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Copy the latest version of all the attachments on the sourceContent to the destinationContent.
| |||||||||||
Returns a count of the number of latest versions of attachments
| |||||||||||
Get all versions of an attachment, starting with the current version
| |||||||||||
Get the most recent version of an attachment with a given name for a particular page
| |||||||||||
Retrieve a named attachment from a page
| |||||||||||
Retrieves the AttachmentDao for the AttachmentManager
| |||||||||||
Retrieve the data for attachment
| |||||||||||
Returns a list of all attachments, old and new.
| |||||||||||
Retrieves a AttachmentDao.AttachmentCopier that will allow the attachments from
one data store to be copied across to another.
| |||||||||||
Retrieves all the last added versions for each user who has added a version of the attachment
That is, if a user has added multiple versions, only the latest added version will be added to the list returned.
| |||||||||||
Returns a list of only latest versions of attachments.
| |||||||||||
Retrieves a AttachmentDao.AttachmentMigrator that will allow the attachments from
one data store to be moved across to another.
| |||||||||||
Get all non-current versions of an attachment, not including the current
version.
| |||||||||||
Removes an Attachment and its data from the server
and data store
| |||||||||||
Removes the contents of attachments from the server
| |||||||||||
Saves an Attachment and its data
| |||||||||||
Saves multiple attachment and their data
| |||||||||||
Set the data belonging to attachment
This method can be used when there is missing data
for an Attachment (e.g.
|
Copy the latest version of all the attachments on the sourceContent to the destinationContent.
sourceContent | the content with attachments to be copied. |
---|---|
destinationContent | the content to copy the attachments to. |
IOException | if there are problems reading or writing attachment data during the copy. |
---|
Returns a count of the number of latest versions of attachments
Get all versions of an attachment, starting with the current version
Get the most recent version of an attachment with a given name for a particular page
content | the page the attachment is attached to |
---|---|
attachmentFileName | the filename of the attachment to be retrieved |
Retrieve a named attachment from a page
content | the page the attachment is attached to |
---|---|
attachmentFileName | the filename of the attachment to retrieve |
version | 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 |
Retrieves the AttachmentDao for the AttachmentManager
Retrieve the data for attachment
attachment | the Attachment the data belongs to |
---|
RuntimeException | if the data could not be found |
---|
Returns a list of all attachments, old and new.
Retrieves a AttachmentDao.AttachmentCopier that will allow the attachments from one data store to be copied across to another.
destination | the AttachmentManager the data is being copied to |
---|
Retrieves all the last added versions for each user who has added a version of the attachment That is, if a user has added multiple versions, only the latest added version will be added to the list returned. Result will be sorted with the earliest version coming first.
attachment | attachment (must be the latest version) |
---|
IllegalArgumentException | if the attachment is not the latest version or null |
---|
Returns a list of only latest versions of attachments.
Retrieves a AttachmentDao.AttachmentMigrator that will allow the attachments from one data store to be moved across to another.
destination | the AttachmentManager the data is being moved to |
---|
Get all non-current versions of an attachment, not including the current version. (ordered from most recent)
attachment | the attachment to get all non-current versions for. |
---|
latestVersion | The attachment to be moved |
---|---|
fileName | New name of the file |
newContent | The new contentEntiityObject which will be parent to the attachment |
Removes an Attachment and its data from the server and data store
attachment | the Attachment to remove |
---|
Removes the contents of attachments from the server
attachments | a List of Attachments |
---|
Saves an Attachment and its data
attachment | the modified version of the Attachment |
---|---|
previousVersion | the original version of the Attachment (null if new) |
attachmentData | an InputStream representing the data of the Attachment |
IOException | |
IllegalArgumentException | if attachment's content is not set |
IOException |
Saves multiple attachment and their data
savableAttachments | the modified version of the Attachment |
---|
IOException | |
IllegalArgumentException | if attachment's content is not set |
IOException |
Set the data belonging to attachment This method can be used when there is missing data for an Attachment (e.g. during imports) and the data needs to be set manually.
attachment | Attachment the data belongs to |
---|---|
attachmentData | the data to be saved |
AttachmentDataExistsException | if data for attachment already exists |
---|