public class Attachment extends Resource
apirev, DEFAULT_API_REV, id, restclient, self| Modifier | Constructor and Description |
|---|---|
protected |
Attachment(RestClient restclient,
net.sf.json.JSONObject json)
Creates an attachment from a JSON payload.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
download()
Downloads attachment to byte array
|
static Attachment |
get(RestClient restclient,
String id)
Retrieves the given attachment record.
|
User |
getAuthor() |
String |
getContentUrl() |
Date |
getCreatedDate() |
String |
getFileName() |
String |
getMimeType() |
int |
getSize() |
String |
toString() |
getApiRev, getAuthUri, getBaseUri, getId, getSelf, getUrl, setApiRevprotected Attachment(RestClient restclient, net.sf.json.JSONObject json)
restclient - REST client instancejson - JSON payloadpublic static Attachment get(RestClient restclient, String id) throws JiraException
restclient - REST client instanceid - Internal JIRA ID of the attachmentJiraException - when the retrieval failspublic byte[] download()
throws JiraException
JiraException - when the download failspublic User getAuthor()
public Date getCreatedDate()
public String getContentUrl()
public String getFileName()
public String getMimeType()
public int getSize()
Copyright © 2022. All rights reserved.