Package com.jcabi.github.safe
Class SfIssue
- java.lang.Object
-
- com.jcabi.github.safe.SfIssue
-
- All Implemented Interfaces:
Issue
,JsonPatchable
,JsonReadable
,Comparable<Issue>
@Immutable @Loggable(1) public final class SfIssue extends Object implements Issue
Safe issue.- Since:
- 0.36
- Version:
- $Id: 4275cea38e4a400a4ab9e93971e520aa63123f59 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Issue
Issue.Smart
-
-
Field Summary
-
Fields inherited from interface com.jcabi.github.Issue
CLOSED_STATE, OPEN_STATE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comments
comments()
Get all comments of the issue.int
compareTo(Issue issue)
Iterable<Event>
events()
Get all events of the issue.boolean
exists()
Does this issue exist in Github?boolean
isLocked()
The issue conversation is locked?javax.json.JsonObject
json()
Describe it in a JSON object.IssueLabels
labels()
Get all labels of the issue.void
lock(String reason)
Locks the issue.int
number()
Get its number.void
patch(javax.json.JsonObject json)
Patch using this JSON object.void
react(Reaction reaction)
Adds the reaction to the issue.Iterable<Reaction>
reactions()
List the reactions of the issue.Repo
repo()
Repository we're in.String
toString()
void
unlock()
Unlocks the issue.
-
-
-
Constructor Detail
-
SfIssue
public SfIssue(Issue issue)
Public ctor.- Parameters:
issue
- The original issue
-
-
Method Detail
-
json
public javax.json.JsonObject json() throws IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
patch
public void patch(javax.json.JsonObject json) throws IOException
Description copied from interface:JsonPatchable
Patch using this JSON object.- Specified by:
patch
in interfaceJsonPatchable
- Parameters:
json
- JSON object- Throws:
IOException
- If there is any I/O problem
-
number
public int number()
Description copied from interface:Issue
Get its number.
-
comments
public Comments comments()
Description copied from interface:Issue
Get all comments of the issue.- Specified by:
comments
in interfaceIssue
- Returns:
- Comments
- See Also:
- Issue Comments API
-
labels
public IssueLabels labels()
Description copied from interface:Issue
Get all labels of the issue.- Specified by:
labels
in interfaceIssue
- Returns:
- Labels
- See Also:
- Labels API
-
events
public Iterable<Event> events() throws IOException
Description copied from interface:Issue
Get all events of the issue.- Specified by:
events
in interfaceIssue
- Returns:
- Events
- Throws:
IOException
- If there is any I/O problem- See Also:
- List Events for an Issue
-
exists
public boolean exists() throws IOException
Description copied from interface:Issue
Does this issue exist in Github?- Specified by:
exists
in interfaceIssue
- Returns:
- TRUE if this issue exists
- Throws:
IOException
- If there is any I/O problem
-
compareTo
public int compareTo(Issue issue)
- Specified by:
compareTo
in interfaceComparable<Issue>
-
react
public void react(Reaction reaction) throws IOException
Description copied from interface:Issue
Adds the reaction to the issue.- Specified by:
react
in interfaceIssue
- Parameters:
reaction
- Reaction to be added.- Throws:
IOException
- If there is any I/O problem
-
reactions
public Iterable<Reaction> reactions()
Description copied from interface:Issue
List the reactions of the issue.
-
unlock
public void unlock()
Description copied from interface:Issue
Unlocks the issue.
-
-