com.atlassian.jira.issue.attachment
Class CreateAttachmentParamsBean
java.lang.Object
com.atlassian.jira.issue.attachment.CreateAttachmentParamsBean
@PublicApi
public class CreateAttachmentParamsBean
- extends Object
Bean containing parameters, which describe created attachment.
- Since:
- v6.0
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 filesystemfilename
- 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 appropriateauthor
- The user who created this attachmentissue
- The issue that this file is to be attached tozip
- This file is a zip file. Null indicates that it is not know if this attachment is a zip file or notthumbnailable
- This file is thumbnailable (e.g. a png image). Null indicates that it is not know if this
attachment is thumbnailable or notattachmentProperties
- 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 propertiescreatedTime
- The created timecopySourceFile
- The source file should remain in file system. Null or false indicates that should be
removed.
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-2014 Atlassian. All Rights Reserved.