public class Comment extends Resource
apirev, DEFAULT_API_REV, id, restclient, self| Modifier | Constructor and Description |
|---|---|
protected |
Comment(RestClient restclient,
net.sf.json.JSONObject json,
String issueKey)
Creates a comment from a JSON payload.
|
| Modifier and Type | Method and Description |
|---|---|
static Comment |
get(RestClient restclient,
String issue,
String id)
Retrieves the given comment record.
|
User |
getAuthor() |
String |
getBody() |
Date |
getCreatedDate() |
User |
getUpdateAuthor() |
Date |
getUpdatedDate() |
Visibility |
getVisibility() |
String |
toString() |
void |
update(String body)
Updates the comment body.
|
void |
update(String body,
String visType,
String visName)
Updates the comment body with limited visibility.
|
getApiRev, getAuthUri, getBaseUri, getId, getSelf, getUrl, setApiRevprotected Comment(RestClient restclient, net.sf.json.JSONObject json, String issueKey)
restclient - REST client instancejson - JSON payloadpublic Visibility getVisibility()
public static Comment get(RestClient restclient, String issue, String id) throws JiraException
restclient - REST client instanceissue - Internal JIRA ID of the associated issueid - Internal JIRA ID of the commentJiraException - when the retrieval failspublic void update(String body) throws JiraException
issue - associated issue recordbody - Comment textJiraException - when the comment update failspublic void update(String body, String visType, String visName) throws JiraException
issue - associated issue recordbody - Comment textvisType - Target audience type (role or group)visName - Name of the role or group to limit visibility toJiraException - when the comment update failspublic User getAuthor()
public String getBody()
public Date getCreatedDate()
public User getUpdateAuthor()
public Date getUpdatedDate()
Copyright © 2022. All rights reserved.