Class AttachmentResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.AttachmentResource
CRUD operations for Attachments on Content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionAttachmentResource(AttachmentService attachmentService, SettingsService settingsService) -
Method Summary
Modifier and TypeMethodDescriptioncreateAttachments(ContentId containerId, ContentStatus containerStatus, boolean allowDuplicated, String expand, List<com.atlassian.plugins.rest.api.multipart.FilePart> fileParts, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> comments, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> minorEdits, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> hiddens) getAttachments(ContentId contentId, String expand, int start, int limit, String filename, String mediaType, javax.ws.rs.core.UriInfo uriInfo) voidjavax.ws.rs.core.ResponseremoveAttachment(ContentId contentId, ContentId attachmentId) javax.ws.rs.core.ResponseremoveAttachmentVersion(ContentId contentId, ContentId attachmentId, int version) updateData(ContentId attachmentId, com.atlassian.plugins.rest.api.multipart.FilePart filePart, com.atlassian.plugins.rest.api.multipart.FilePart comment, com.atlassian.plugins.rest.api.multipart.FilePart minorEdit, com.atlassian.plugins.rest.api.multipart.FilePart hidden)
-
Constructor Details
-
AttachmentResource
@Inject public AttachmentResource(AttachmentService attachmentService, SettingsService settingsService)
-
-
Method Details
-
getAttachments
@PublicApi public RestList<Content> getAttachments(ContentId contentId, String expand, int start, int limit, String filename, String mediaType, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException - Throws:
ServiceException
-
createAttachments
@PublicApi public RestList<Content> createAttachments(ContentId containerId, ContentStatus containerStatus, boolean allowDuplicated, String expand, List<com.atlassian.plugins.rest.api.multipart.FilePart> fileParts, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> comments, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> minorEdits, @Nullable List<com.atlassian.plugins.rest.api.multipart.FilePart> hiddens) throws ServiceException - Throws:
ServiceException
-
update
- Throws:
ServiceException
-
updateData
@PublicApi public Content updateData(ContentId attachmentId, com.atlassian.plugins.rest.api.multipart.FilePart filePart, com.atlassian.plugins.rest.api.multipart.FilePart comment, com.atlassian.plugins.rest.api.multipart.FilePart minorEdit, com.atlassian.plugins.rest.api.multipart.FilePart hidden) throws ServiceException - Throws:
ServiceException
-
move
public void move(ContentId contentId, ContentId attachmentId, ContentId newContentId, String newName) throws ServiceException - Throws:
ServiceException
-
removeAttachment
public javax.ws.rs.core.Response removeAttachment(ContentId contentId, ContentId attachmentId) throws ServiceException - Throws:
ServiceException
-
removeAttachmentVersion
public javax.ws.rs.core.Response removeAttachmentVersion(ContentId contentId, ContentId attachmentId, int version) throws ServiceException - Throws:
ServiceException
-