| java.lang.Object | |
| ↳ | com.atlassian.jira.issue.managers.DefaultAttachmentManager |
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.issue.AttachmentManager
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Determine if attachments have been enabled in JIRA and if the attachments directory exists.
| |||||||||||
Converts a set of provided temporary attachments to real attachments attached to an issue.
| |||||||||||
Converts a set of provided temporary attachments to real attachments attached to an issue.
| |||||||||||
Create an attachment in the database.
| |||||||||||
Create an attachment both on disk, and in the database.
| |||||||||||
Same as the
createAttachment(File, String, String, User, Issue, Map, Date) method, except it submits no
attachmentProperties and uses now() for the created time. | |||||||||||
Create an attachment both on disk, and in the database.
| |||||||||||
Same as the
createAttachment(java.io.File, String, String, User, org.ofbiz.core.entity.GenericValue, java.util.Map, java.util.Date) method, except it
submits no attachmentProperties and uses now() for the created time. | |||||||||||
Create an attachment both on disk, and in the database.
| |||||||||||
Create an attachment both on disk, and in the database.
| |||||||||||
Create an attachment both on disk, and in the database.
| |||||||||||
Create an attachment both on disk, and in the database by copying the provided file instead of moving it.
| |||||||||||
Delete an attachment from the database and from the attachment store.
| |||||||||||
Delete the attachment directory from disk if the directory is empty.
| |||||||||||
Get a single attachment by its ID.
| |||||||||||
Get a list of all attachments for a certain issue.
| |||||||||||
Get a list of all attachments for a certain issue, sorted according to the specified comparator.
| |||||||||||
Determine if screenshot applet has been enabled in JIRA.
| |||||||||||
Determine if the screenshot applet is supported by the user's operating system.
| |||||||||||
Create a new directory for this issue, and move all the attachments from the old directory to the new directory.
| |||||||||||
Stores the thumbnailble flag for this attachment
| |||||||||||
Stores the zip flag for this attachment
| |||||||||||
Get binary content of the attachment
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.issue.AttachmentManager
| |||||||||||
Determine if attachments have been enabled in JIRA and if the attachments directory exists.
Converts a set of provided temporary attachments to real attachments attached to an issue. This method will also clean up any temporary attachments still linked to the issue via the TemporaryAttachmentsMonitor.
| user | The user performing the action |
|---|---|
| issue | The issue attachments should be linked to |
| selectedAttachments | The temporary attachment ids to convert as selected by the user |
| temporaryAttachmentsMonitor | TemporaryAttachmentsMonitor containing information about all temporary attachments |
| AttachmentException |
|---|
Converts a set of provided temporary attachments to real attachments attached to an issue. This method will also clean up any temporary attachments still linked to the issue via the TemporaryAttachmentsMonitor.
| user | The user performing the action |
|---|---|
| issue | The issue attachments should be linked to |
| selectedAttachments | The temporary attachment ids to convert as selected by the user |
| temporaryAttachmentsMonitor | TemporaryAttachmentsMonitor containing information about all temporary attachments |
| AttachmentException |
|---|
Create an attachment in the database. Note that this does not create it on disk, nor does it create a change item.
| issue | the issue that this attachment is attached to |
|---|---|
| author | The user who created this attachment |
| mimetype | mimetype |
| filename | The desired filename for this attachment. |
| filesize | filesize |
| attachmentProperties | Attachment properties (a Map of String -> Object properties). |
| createdTime | when the attachment was created |
Create an attachment both on disk, and in the database.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. Implementations of this interface can choose to override this value as appropriate |
| remoteUser | The user who created this attachment |
| issue | The issue that this file is to be attached to |
| zip | This file is a zip file. Null indicates that it is not know if this attachment is a zip file or not |
| thumbnailable | This file is thumbnailable (e.g. a png image). Null indicates that it is not know if this attachment is thumbnailable or not |
| attachmentProperties | Attachment properties (a Map of String -> Object properties). These are optional,
and are used to populate a PropertySet on the Attachment (getProperties(). Pass null to set no properties |
| createdTime | the created time |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Same as the createAttachment(File, String, String, User, Issue, Map, Date) method, except it submits no
attachmentProperties and uses now() for the created time.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. Implementations of this interface can choose to override this value as appropriate |
| remoteUser | The user who created this attachment |
| issue | The issue that this attachment is attached to |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Create an attachment both on disk, and in the database.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. This may be modified if a better alternative is suggested by getSanitisedMimeType(String, String) |
| author | The user who created this attachment |
| issue | The issue that this attachment is attached to |
| zip | This file is a zip file. Null indicates that it is not know if this attachment is a zip file or not |
| thumbnailable | This file is thumbnailable (e.g. a png image). Null indicates that it is not know if this attachment is thumbnailable or not |
| attachmentProperties | String -> Object property map |
| createdTime | the created time |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Same as the createAttachment(java.io.File, String, String, User, org.ofbiz.core.entity.GenericValue, java.util.Map, java.util.Date) method, except it
submits no attachmentProperties and uses now() for the created time.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. Implementations of this interface can choose to override this value as appropriate |
| remoteUser | The user who created this attachment |
| issue | The issue that this attachment is attached to |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Create an attachment both on disk, and in the database.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. Implementations of this interface can choose to override this value as appropriate |
| remoteUser | The user who created this attachment |
| issue | The issue that this file is to be attached to |
| attachmentProperties | Attachment properties (a Map of String -> Object properties). These are optional,
and are used to populate a PropertySet on the Attachment (getProperties(). Pass null to set no properties |
| createdTime | the created time |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Create an attachment both on disk, and in the database.
| file | A file on a locally accessible filesystem |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. This may be modified if a better alternative is suggested by getSanitisedMimeType(String, String) |
| author | The user who created this attachment |
| issue | The issue that this attachment is attached to |
| attachmentProperties | String -> Object property map |
| createdTime | the created time |
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Create an attachment both on disk, and in the database.
| bean | Parameters which describe created attachment |
|---|
ChangeItemBean with all the changes to the issue.| AttachmentException |
|---|
Create an attachment both on disk, and in the database by copying the provided file instead of moving it.
| file | A file on a locally accessible filesystem, this will be copied, not moved. |
|---|---|
| filename | The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads) |
| contentType | The desired contentType. Implementations of this interface can choose to override this value as appropriate |
| attachmentAuthor | The username of the user who created this attachment, this is not validated so it must be a valid username |
| issue | The id of the issue that this attachment is attached to |
| attachmentProperties | Attachment properties (a Map of String -> Object properties). These are optional,
and are used to populate a PropertySet on the Attachment (getProperties(). Pass null to set no properties |
| createdTime | when the attachment was created |
| AttachmentException |
|---|
Delete an attachment from the database and from the attachment store.
| attachment | the Attachment |
|---|
| RemoveException |
|---|
Delete the attachment directory from disk if the directory is empty.
| issue | the issue whose attachment directory we wish to delete. |
|---|
| RemoveException |
|---|
Get a single attachment by its ID.
| id | the Attachment ID |
|---|
Get a list of all attachments for a certain issue.
| issue | the Issue |
|---|
Attachment objectsGet a list of all attachments for a certain issue, sorted according to the specified comparator.
| issue | the Issue |
|---|---|
| comparator | used for sorting |
Attachment objectsDetermine if screenshot applet has been enabled in JIRA.
Determine if the screenshot applet is supported by the user's operating system. Note. This always returns true now as we support screenshots on all our supported platforms
Create a new directory for this issue, and move all the attachments from the old directory to the new directory.
NB - this will fail if the old directory and new directory are on different filesystems asrenameTo(File)
fails across filesystems.| oldIssue | the issue we're moving attachments from |
|---|---|
| newIssueKey | the new destination issue key |
Stores the thumbnailble flag for this attachment
| attachment | The attachment |
|---|---|
| thumbnailable | True if this attachment is thumnailable |
Stores the zip flag for this attachment
| attachment | The attachment |
|---|---|
| zip | True if this attachment is a zip file |
Get binary content of the attachment
| attachment | the attachment whose content to stream (required) |
|---|---|
| consumer | the consumer of the stream (required) |