public class

AttachmentResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.AttachmentResource

Summary

Public Constructors
AttachmentResource(AttachmentService attachmentService, AttachmentManager attachmentManager, PermissionManager permissionManager, JiraAuthenticationContext authContext, BeanBuilderFactory beanBuilderFactory, I18nHelper i18n, ContextUriInfo uriInfo)
Public Methods
Response getAttachment(String id)
Returns the meta-data for an attachment, including the URI of the actual attached file.
Response getAttachmentMeta()
Returns the meta informations for an attachments, specifically if they are enabled and the maximum upload size allowed.
Response removeAttachment(String id)
Remove an attachment from an issue.
Protected Methods
boolean hasPermissionToViewAttachment(User user, Attachment attachment)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AttachmentResource (AttachmentService attachmentService, AttachmentManager attachmentManager, PermissionManager permissionManager, JiraAuthenticationContext authContext, BeanBuilderFactory beanBuilderFactory, I18nHelper i18n, ContextUriInfo uriInfo)

Public Methods

public Response getAttachment (String id)

Returns the meta-data for an attachment, including the URI of the actual attached file.

Parameters
id the attachment id
Returns
  • a JSON representation of an attachment

public Response getAttachmentMeta ()

Returns the meta informations for an attachments, specifically if they are enabled and the maximum upload size allowed.

Returns
  • a JSON representation of the enable atachment capabilities

public Response removeAttachment (String id)

Remove an attachment from an issue.

Parameters
id the id of the attachment to ddelete.
Returns
  • no content

Protected Methods

protected boolean hasPermissionToViewAttachment (User user, Attachment attachment)