Class Release.Smart

java.lang.Object
com.jcabi.github.Release.Smart
All Implemented Interfaces:
JsonPatchable, JsonReadable, Release
Enclosing interface:
Release

@Immutable @Loggable(1) public static final class Release.Smart extends Object implements Release
Smart release.
Since:
0.8
  • Constructor Details

    • Smart

      public Smart(Release original)
      Public CTOR.
      Parameters:
      original - Original release
  • Method Details

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

      public Repo repo()
      Description copied from interface: Release
      Owner of them.
      Specified by:
      repo in interface Release
      Returns:
      Repo
    • number

      public int number()
      Description copied from interface: Release
      Release id.
      Specified by:
      number in interface Release
      Returns:
      Id
    • assets

      public ReleaseAssets assets()
      Description copied from interface: Release
      Get all release assets of this release.
      Specified by:
      assets in interface Release
      Returns:
      Release assets.
      See Also:
    • url

      public URL url() throws IOException
      Get release url.
      Returns:
      Release url
      Throws:
      IOException - If there is any I/O problem
    • htmlUrl

      public URL htmlUrl() throws IOException
      Get release html url.
      Returns:
      Release html url
      Throws:
      IOException - If there is any I/O problem
    • assetsUrl

      public URL assetsUrl() throws IOException
      Get release assets url.
      Returns:
      Release assets url
      Throws:
      IOException - If there is any I/O problem
    • uploadUrl

      public URL uploadUrl() throws IOException
      Get release upload url.
      Returns:
      Release upload url
      Throws:
      IOException - If there is any I/O problem
    • tag

      public String tag() throws IOException
      Get release tag name.
      Returns:
      The release tag name
      Throws:
      IOException - If there is any I/O problem
    • hasTag

      public boolean hasTag() throws IOException
      Has release tag?
      Returns:
      TRUE if tag exists
      Throws:
      IOException - If there is any I/O problem
      Since:
      0.21
    • tag

      public void tag(String text) throws IOException
      Change its tag name.
      Parameters:
      text - Tag name
      Throws:
      IOException - If there is any I/O problem
    • commitish

      public String commitish() throws IOException
      Get release target commitish.
      Returns:
      Release target commitish value
      Throws:
      IOException - If there is any I/O problem
    • commitish

      public void commitish(String text) throws IOException
      Change its target commitish.
      Parameters:
      text - Target commitish.
      Throws:
      IOException - If there is any I/O problem
    • hasName

      public boolean hasName() throws IOException
      Does this release have a name?
      Returns:
      Whether this release has a name
      Throws:
      IOException - If there is any I/O problem
    • name

      public String name() throws IOException
      Get release name. Note that there may not be one, so make sure to check with hasName() first.
      Returns:
      Release name
      Throws:
      IOException - If there is any I/O problem
    • name

      public void name(String text) throws IOException
      Change its name.
      Parameters:
      text - Name of release.
      Throws:
      IOException - If there is any I/O problem
    • hasBody

      public boolean hasBody() throws IOException
      Has release body.
      Returns:
      TRUE if release body exists
      Throws:
      IOException - If there is any I/O problem
    • body

      public String body() throws IOException
      Get release body.
      Returns:
      Release body
      Throws:
      IOException - If there is any I/O problem
    • body

      public void body(String text) throws IOException
      Change its body.
      Parameters:
      text - Text describing the contents of the tag
      Throws:
      IOException - If there is any I/O problem
    • createdAt

      public Date createdAt() throws IOException
      Get release creation date.
      Returns:
      Release creation date
      Throws:
      IOException - If there is any I/O problem
    • publishedAt

      public Date publishedAt() throws IOException
      Get release publication date.
      Returns:
      Release publication date
      Throws:
      IOException - If there is any I/O problem
    • draft

      public boolean draft() throws IOException
      Is release draft.
      Returns:
      Returns true if it's draft
      Throws:
      IOException - If there is any I/O problem
    • draft

      public void draft(boolean draft) throws IOException
      Change its status.
      Parameters:
      draft - True makes the release a draft.
      Throws:
      IOException - If there is any I/O problem
    • prerelease

      public boolean prerelease() throws IOException
      Is it prerelease.
      Returns:
      Returns true if it's prerelease
      Throws:
      IOException - If there is any I/O problem
    • prerelease

      public void prerelease(boolean pre) throws IOException
      Change its prerelease.
      Parameters:
      pre - True to identify the release as a prerelease.
      Throws:
      IOException - If there is any I/O problem
    • delete

      public void delete() throws IOException
      Description copied from interface: Release
      Deletes a release.
      Specified by:
      delete in interface Release
      Throws:
      IOException - If any I/O problems occur.