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.
Since:
0.1
  • Constructor Details

    • Smart

      public Smart(Milestone mls)
      Public ctor.
      Parameters:
      mls - Issue
  • Method Details

    • 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
    • repo

      public Repo repo()
      Description copied from interface: Milestone
      Repository we're in.
      Specified by:
      repo in interface Milestone
      Returns:
      Repo
    • number

      public int number()
      Description copied from interface: Milestone
      Get its number.
      Specified by:
      number in interface Milestone
      Returns:
      Milestone number
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem
    • patch

      public void patch(jakarta.json.JsonObject json) throws IOException
      Description copied from interface: JsonPatchable
      Patch using this JSON object.
      Specified by:
      patch in interface JsonPatchable
      Parameters:
      json - JSON object
      Throws:
      IOException - If there is any I/O problem
    • compareTo

      public int compareTo(Milestone obj)
      Specified by:
      compareTo in interface Comparable<Milestone>