Package com.jcabi.github
Class Releases.Smart
- java.lang.Object
-
- com.jcabi.github.Releases.Smart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Releases
Releases.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Release
create(String tag)
Create new release.boolean
exists(String tag)
This release exists by the tag.Release
find(String tag)
Find release by the tag (runtime exception if not found).Release
get(int number)
Get a single release.Iterable<Release>
iterate()
Iterate them all.void
remove(int number)
Remove a release.Repo
repo()
Owner of them.
-
-
-
Constructor Detail
-
Smart
public Smart(Releases original)
Public CTOR.- Parameters:
original
- Original releases
-
-
Method Detail
-
iterate
public Iterable<Release> iterate()
Description copied from interface:Releases
Iterate them all.
-
get
public Release get(int number)
Description copied from interface:Releases
Get a single release.- Specified by:
get
in interfaceReleases
- Parameters:
number
- Release id- Returns:
- Release
- See Also:
- Get a single release
-
create
public Release create(String tag) throws IOException
Description copied from interface:Releases
Create new release.- Specified by:
create
in interfaceReleases
- Parameters:
tag
- The name of the tag- Returns:
- Release just created
- Throws:
IOException
- If there is any I/O problem- See Also:
- Create an Release
-
remove
public void remove(int number) throws IOException
Description copied from interface:Releases
Remove a release.- Specified by:
remove
in interfaceReleases
- Parameters:
number
- ID of the release to remove.- Throws:
IOException
- If an IO problem occurs.- See Also:
- Delete a release.
-
exists
public boolean exists(String tag) throws IOException
This release exists by the tag.- Parameters:
tag
- The tag- Returns:
- TRUE if it already exists
- Throws:
IOException
- If fails
-
find
public Release find(String tag) throws IOException
Find release by the tag (runtime exception if not found).- Parameters:
tag
- The tag- Returns:
- Release found
- Throws:
IOException
- If fails
-
-