Package com.jcabi.github
Class Milestone.Smart
- java.lang.Object
-
- com.jcabi.github.Milestone.Smart
-
- All Implemented Interfaces:
JsonPatchable,JsonReadable,Milestone,Comparable<Milestone>
- Enclosing interface:
- Milestone
@Immutable @Loggable(1) public static final class Milestone.Smart extends Object implements Milestone
Smart Milestone with extra features.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Milestone
Milestone.Smart
-
-
Field Summary
-
Fields inherited from interface com.jcabi.github.Milestone
CLOSED_STATE, OPEN_STATE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close it (make sure it's closed).intclosedIssues()Get number of closed issues.intcompareTo(Milestone obj)DatecreatedAt()When this milestone was created.Usercreator()Get its creator.Stringdescription()Get its description.voiddescription(String description)Change its description.DatedueOn()The milestone due date.voiddueOn(Date dueon)Change milestone due date.booleanisOpen()Is it open?javax.json.JsonObjectjson()Describe it in a JSON object.intnumber()Get its number.voidopen()Open it (make sure it's open).intopenIssues()Get number of open issues.voidpatch(javax.json.JsonObject json)Patch using this JSON object.Reporepo()Repository we're in.Stringstate()Get its state.voidstate(String state)Change its state.Stringtitle()Get its title.voidtitle(String title)Change its title.URLurl()Get its URL.
-
-
-
Constructor Detail
-
Smart
public Smart(Milestone mls)
Public ctor.- Parameters:
mls- Issue
-
-
Method Detail
-
creator
public User creator() throws IOException
Get its creator.- Returns:
- Creator of milestone (who submitted it)
- Throws:
IOException- If there is any I/O problem
-
isOpen
public boolean isOpen() throws IOExceptionIs it open?- Returns:
- TRUE if it's open
- Throws:
IOException- If there is any I/O problem
-
open
public void open() throws IOExceptionOpen it (make sure it's open).- Throws:
IOException- If there is any I/O problem
-
close
public void close() throws IOExceptionClose it (make sure it's closed).- Throws:
IOException- If there is any I/O problem
-
state
public String state() throws IOException
Get its state.- Returns:
- State of milestone
- Throws:
IOException- If there is any I/O problem
-
state
public void state(String state) throws IOException
Change its state.- Parameters:
state- State of milestone- Throws:
IOException- If there is any I/O problem
-
title
public String title() throws IOException
Get its title.- Returns:
- Title of milestone
- Throws:
IOException- If there is any I/O problem
-
title
public void title(String title) throws IOException
Change its title.- Parameters:
title- Title of milestone- Throws:
IOException- If there is any I/O problem
-
description
public String description() throws IOException
Get its description.- Returns:
- Title of milestone
- Throws:
IOException- If there is any I/O problem
-
description
public void description(String description) throws IOException
Change its description.- Parameters:
description- Description of milestone- Throws:
IOException- If there is any I/O problem
-
url
public URL url() throws IOException
Get its URL.- Returns:
- URL of milestone
- Throws:
IOException- If there is any I/O problem
-
createdAt
public Date createdAt() throws IOException
When this milestone was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
dueOn
public Date dueOn() throws IOException
The milestone due date.- Returns:
- The milestone due date
- Throws:
IOException- If there is any I/O problem
-
dueOn
public void dueOn(Date dueon) throws IOException
Change milestone due date.- Parameters:
dueon- New milestone due date- Throws:
IOException- If there is any I/O problem
-
openIssues
public int openIssues() throws IOExceptionGet number of open issues.- Returns:
- Number of open issues
- Throws:
IOException- If there is any I/O problem
-
closedIssues
public int closedIssues() throws IOExceptionGet number of closed issues.- Returns:
- Number of closed issues
- Throws:
IOException- If there is any I/O problem
-
number
public int number()
Description copied from interface:MilestoneGet its number.
-
json
public javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
patch
public void patch(javax.json.JsonObject json) throws IOExceptionDescription copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-
compareTo
public int compareTo(Milestone obj)
- Specified by:
compareToin interfaceComparable<Milestone>
-
-