Package com.jcabi.github
Interface References
-
@Immutable public interface References
Github Git Data References.- Since:
- 0.8
- Version:
- $Id: 0b5d3c280caa68483cd278486dd99e9698efbd7e $
- Author:
- Carlos Miranda (miranda.cma@gmail.com)
- See Also:
- References API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Referencecreate(String ref, String sha)Creates a reference.Referenceget(String identifier)Get Reference by identifier.Iterable<Reference>heads()Iterate references under "heads" sub-namespace.Iterable<Reference>iterate()Iterates all references.Iterable<Reference>iterate(String subnamespace)Iterates references in sub-namespace.voidremove(String identifier)Removes a reference by its identifier.Reporepo()Owner of them.Iterable<Reference>tags()Iterate references under "tags" sub-namespace.
-
-
-
Method Detail
-
repo
Repo repo()
Owner of them.- Returns:
- Repo
-
create
Reference create(String ref, String sha) throws IOException
Creates a reference.- Parameters:
ref- The name of the fully qualified reference (ie: refs/heads/master).sha- The SHA1 value to set this reference to.- Returns:
- Reference - The newly created Reference
- Throws:
IOException- - If there are any errors.
-
get
Reference get(String identifier)
Get Reference by identifier.- Parameters:
identifier- Reference's name.- Returns:
- Reference The reference with the given name
-
iterate
Iterable<Reference> iterate(String subnamespace)
Iterates references in sub-namespace.- Parameters:
subnamespace- Sub-namespace- Returns:
- Iterator of references.
-
tags
Iterable<Reference> tags()
Iterate references under "tags" sub-namespace.- Returns:
- Iterator of references.
-
heads
Iterable<Reference> heads()
Iterate references under "heads" sub-namespace.- Returns:
- Iterator of references.
-
remove
void remove(String identifier) throws IOException
Removes a reference by its identifier.- Parameters:
identifier- Reference's identifier.- Throws:
IOException- If there is any I/O problem.
-
-