com.atlassian.jira.issue.attachment
Class CreateAttachmentParamsBean

java.lang.Object
  extended by com.atlassian.jira.issue.attachment.CreateAttachmentParamsBean

@PublicApi
public class CreateAttachmentParamsBean
extends Object

Bean containing parameters, which describe created attachment.

Since:
v6.0

Nested Class Summary
static class CreateAttachmentParamsBean.Builder
           
 
Constructor Summary
CreateAttachmentParamsBean(File file, String filename, String contentType, ApplicationUser author, Issue issue, Boolean zip, Boolean thumbnailable, Map<String,Object> attachmentProperties, Date createdTime, Boolean copySourceFile)
           
 
Method Summary
 Map<String,Object> getAttachmentProperties()
           
 ApplicationUser getAuthor()
           
 String getContentType()
           
 Boolean getCopySourceFile()
           
 Date getCreatedTime()
           
 File getFile()
           
 String getFilename()
           
 Issue getIssue()
           
 Boolean getThumbnailable()
           
 Boolean getZip()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateAttachmentParamsBean

public CreateAttachmentParamsBean(File file,
                                  String filename,
                                  String contentType,
                                  ApplicationUser author,
                                  Issue issue,
                                  Boolean zip,
                                  Boolean thumbnailable,
                                  Map<String,Object> attachmentProperties,
                                  Date createdTime,
                                  Boolean copySourceFile)
Parameters:
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
author - 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 (Attachment.getProperties(). Pass null to set no properties
createdTime - The created time
copySourceFile - The source file should remain in file system. Null or false indicates that should be removed.
Method Detail

getFile

public File getFile()

getFilename

public String getFilename()
Returns:
The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads)

getContentType

public String getContentType()
Returns:
The desired contentType. Implementations of this interface can choose to override this value as appropriate

getAuthor

public ApplicationUser getAuthor()
Returns:
The user who created this attachment

getIssue

public Issue getIssue()
Returns:
The issue that this file is to be attached to

getZip

public Boolean getZip()
Returns:
This file is a zip file. Null indicates that it is not know if this attachment is a zip file or not

getThumbnailable

public Boolean getThumbnailable()
Returns:
This file is thumbnailable (e.g. a png image). Null indicates that it is not know if this attachment is thumbnailable or not

getAttachmentProperties

public Map<String,Object> getAttachmentProperties()
Returns:
Attachment properties (a Map of String -> Object properties). These are optional, and are used to populate a PropertySet on the Attachment (Attachment.getProperties(). Pass null to set no properties

getCreatedTime

public Date getCreatedTime()
Returns:
the created time

getCopySourceFile

public Boolean getCopySourceFile()
Returns:
The source file should remain in file system. Null or false indicates that should be removed.


Copyright © 2002-2013 Atlassian. All Rights Reserved.