@PublicApi public class

CreateAttachmentParamsBean

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.attachment.CreateAttachmentParamsBean

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Bean containing parameters, which describe created attachment.

Summary

Nested Classes
class CreateAttachmentParamsBean.Builder  
Public Constructors
CreateAttachmentParamsBean(File file, String filename, String contentType, ApplicationUser author, Issue issue, Boolean zip, Boolean thumbnailable, Map<StringObject> attachmentProperties, Date createdTime, Boolean copySourceFile)
Public Methods
Map<StringObject> getAttachmentProperties()
@Nullable ApplicationUser getAuthor()
String getContentType()
Boolean getCopySourceFile()
Date getCreatedTime()
File getFile()
String getFilename()
Issue getIssue()
Boolean getThumbnailable()
Boolean getZip()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CreateAttachmentParamsBean (File file, String filename, String contentType, ApplicationUser author, Issue issue, Boolean zip, Boolean thumbnailable, Map<StringObject> 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 (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.

Public Methods

public Map<StringObject> getAttachmentProperties ()

Returns
  • 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

@Nullable public ApplicationUser getAuthor ()

Returns
  • The user who created this attachment

public String getContentType ()

Returns
  • The desired contentType. Implementations of this interface can choose to override this value as appropriate

public Boolean getCopySourceFile ()

Returns
  • The source file should remain in file system. Null or false indicates that should be removed.

public Date getCreatedTime ()

Returns
  • the created time

public File getFile ()

Returns
  • A file on a locally accessible filesystem

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)

public Issue getIssue ()

Returns
  • The issue that this file is to be attached to

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

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