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 ReleaseAssetsassets()Get all release assets of this release.URLassetsUrl()Get release assets url.Stringbody()Get release body.voidbody(String text)Change its body.Stringcommitish()Get release target commitish.voidcommitish(String text)Change its target commitish.DatecreatedAt()Get release creation date.voiddelete()Deletes a release.booleandraft()Is release draft.voiddraft(boolean draft)Change its status.booleanhasBody()Has release body.booleanhasName()Does this release have a name?booleanhasTag()Has release tag?URLhtmlUrl()Get release html url.javax.json.JsonObjectjson()Describe it in a JSON object.Stringname()Get release name.voidname(String text)Change its name.intnumber()Release id.voidpatch(javax.json.JsonObject json)Patch using this JSON object.booleanprerelease()Is it prerelease.voidprerelease(boolean pre)Change its prerelease.DatepublishedAt()Get release publication date.Reporepo()Owner of them.Stringtag()Get release tag name.voidtag(String text)Change its tag name.URLuploadUrl()Get release upload url.URLurl()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 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
-
number
public int number()
Description copied from interface:ReleaseRelease id.
-
assets
public ReleaseAssets assets()
Description copied from interface:ReleaseGet all release assets of this release.- Specified by:
assetsin 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 IOExceptionHas 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 IOExceptionDoes 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 IOExceptionHas 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 IOExceptionIs 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 IOExceptionChange its status.- Parameters:
draft- True makes the release a draft.- Throws:
IOException- If there is any I/O problem
-
prerelease
public boolean prerelease() throws IOExceptionIs 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 IOExceptionChange 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 IOExceptionDescription copied from interface:ReleaseDeletes a release.- Specified by:
deletein interfaceRelease- Throws:
IOException- If any I/O problems occur.
-
-