|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl
public class AttachmentServiceImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.AttachmentService |
---|
AttachmentService.AttachmentFinder, AttachmentService.Validator |
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.api.service.content.AttachmentService |
---|
COMMENT_METADATA_KEY, MEDIA_TYPE_METADATA_KEY |
Constructor Summary | |
---|---|
AttachmentServiceImpl(PermissionManager permissionManager,
ContentEntityManager contentEntityManager,
FileUploadManager fileUploadManager,
AttachmentManagerInternal attachmentManager,
AttachmentFactory attachmentFactory,
AttachmentContentTypeBinding binding)
|
Method Summary | |
---|---|
PageResponse<Content> |
addAttachments(ContentId containerId,
java.util.Collection<AttachmentUpload> uploads)
Add one or more attachments to a piece of Content . |
void |
delete(Content attachmentContent)
Removes an Attachment from the system. |
AttachmentService.AttachmentFinder |
find(Expansion... expansions)
Creates an attachment finder for locating attachments. |
Content |
update(Content updatedContent)
Updates the non-data parts of an Attachment Content instance. |
Content |
updateData(ContentId attachmentId,
AttachmentUpload upload)
Updates the data part of an Attachment Content instance. |
com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl.ValidatorImpl |
validator()
Provides a validator for validating actions on the AttachmentService and checking permissions related to attachments on Content |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttachmentServiceImpl(PermissionManager permissionManager, ContentEntityManager contentEntityManager, FileUploadManager fileUploadManager, AttachmentManagerInternal attachmentManager, AttachmentFactory attachmentFactory, AttachmentContentTypeBinding binding)
Method Detail |
---|
public PageResponse<Content> addAttachments(ContentId containerId, java.util.Collection<AttachmentUpload> uploads) throws ServiceException
AttachmentService
Content
.
addAttachments
in interface AttachmentService
containerId
- the id of the content to attach touploads
- the attachments being uploaded
ServiceException
public AttachmentService.AttachmentFinder find(Expansion... expansions)
AttachmentService
Content attachment = attachmentService.find()
.withContainerId(pageId)
.withFilename("myfile.txt")
.fetchOneOrNull();
find
in interface AttachmentService
expansions
- the expansions to apply to the values returned from a fetch
public Content update(Content updatedContent) throws ServiceException
AttachmentService
Content
instance.
This method can be used to update the container, filename, media-type and comment of an Attachment.
update
in interface AttachmentService
updatedContent
- the attachment to update, must include an id
ServiceException
public Content updateData(ContentId attachmentId, AttachmentUpload upload) throws ServiceException
AttachmentService
Content
instance.
updateData
in interface AttachmentService
attachmentId
- the id of the attachment to updateupload
- the new content of the Attachment
ServiceException
public void delete(Content attachmentContent) throws ServiceException
AttachmentService
delete
in interface AttachmentService
attachmentContent
- the content to remove
ServiceException
- if the content cannot be found, or cannot be deletedpublic com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl.ValidatorImpl validator()
AttachmentService
validator
in interface AttachmentService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |