Package com.google.gerrit.server.project
Class RefResource
- java.lang.Object
-
- com.google.gerrit.server.project.ProjectResource
-
- com.google.gerrit.server.project.RefResource
-
- All Implemented Interfaces:
RestResource
- Direct Known Subclasses:
BranchResource
,TagResource
public abstract class RefResource extends ProjectResource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gerrit.extensions.restapi.RestResource
RestResource.HasETag, RestResource.HasLastModified
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.project.ProjectResource
PROJECT_KIND
-
-
Constructor Summary
Constructors Constructor Description RefResource(ProjectState projectState, CurrentUser user)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract String
getRef()
Returns the ref's nameabstract Optional<String>
getRevision()
Returns the ref's revision.-
Methods inherited from class com.google.gerrit.server.project.ProjectResource
getName, getNameKey, getProjectState, getUser
-
-
-
-
Constructor Detail
-
RefResource
public RefResource(ProjectState projectState, CurrentUser user)
-
-
Method Detail
-
getRef
public abstract String getRef()
Returns the ref's name
-
getRevision
public abstract Optional<String> getRevision()
Returns the ref's revision.- Returns:
- the ref's revision,
Optional.empty()
if the ref doesn't exist (yet)
-
-