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 void
close()
Close it (make sure it's closed).int
closedIssues()
Get number of closed issues.int
compareTo(Milestone obj)
Date
createdAt()
When this milestone was created.User
creator()
Get its creator.String
description()
Get its description.void
description(String description)
Change its description.Date
dueOn()
The milestone due date.void
dueOn(Date dueon)
Change milestone due date.boolean
isOpen()
Is it open?javax.json.JsonObject
json()
Describe it in a JSON object.int
number()
Get its number.void
open()
Open it (make sure it's open).int
openIssues()
Get number of open issues.void
patch(javax.json.JsonObject json)
Patch using this JSON object.Repo
repo()
Repository we're in.String
state()
Get its state.void
state(String state)
Change its state.String
title()
Get its title.void
title(String title)
Change its title.URL
url()
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 IOException
Is it open?- Returns:
- TRUE if it's open
- Throws:
IOException
- If there is any I/O problem
-
open
public void open() throws IOException
Open it (make sure it's open).- Throws:
IOException
- If there is any I/O problem
-
close
public void close() throws IOException
Close 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 IOException
Get number of open issues.- Returns:
- Number of open issues
- Throws:
IOException
- If there is any I/O problem
-
closedIssues
public int closedIssues() throws IOException
Get 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:Milestone
Get its number.
-
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
-
compareTo
public int compareTo(Milestone obj)
- Specified by:
compareTo
in interfaceComparable<Milestone>
-
-