Package com.jcabi.github
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Release
Release.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReleaseAssets
assets()
Get all release assets of this release.URL
assetsUrl()
Get release assets url.String
body()
Get release body.void
body(String text)
Change its body.String
commitish()
Get release target commitish.void
commitish(String text)
Change its target commitish.Date
createdAt()
Get release creation date.void
delete()
Deletes a release.boolean
draft()
Is release draft.void
draft(boolean draft)
Change its status.boolean
hasBody()
Has release body.boolean
hasName()
Does this release have a name?boolean
hasTag()
Has release tag?URL
htmlUrl()
Get release html url.javax.json.JsonObject
json()
Describe it in a JSON object.String
name()
Get release name.void
name(String text)
Change its name.int
number()
Release id.void
patch(javax.json.JsonObject json)
Patch using this JSON object.boolean
prerelease()
Is it prerelease.void
prerelease(boolean pre)
Change its prerelease.Date
publishedAt()
Get release publication date.Repo
repo()
Owner of them.String
tag()
Get release tag name.void
tag(String text)
Change its tag name.URL
uploadUrl()
Get release upload url.URL
url()
Get release url.
-
-
-
Constructor Detail
-
Smart
public Smart(Release original)
Public CTOR.- Parameters:
original
- Original release
-
-
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:Release
Release id.
-
assets
public ReleaseAssets assets()
Description copied from interface:Release
Get all release assets of this release.- Specified by:
assets
in interfaceRelease
- Returns:
- Release assets.
- See Also:
- Releases API
-
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 withhasName()
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 interfaceRelease
- Throws:
IOException
- If any I/O problems occur.
-
-