Package com.google.gerrit.server.change
Class RevisionJson
- java.lang.Object
-
- com.google.gerrit.server.change.RevisionJson
-
public class RevisionJson extends Object
ProducesRevisionInfo
andCommitInfo
which are serialized to JSON afterwards.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RevisionJson.Factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommitInfo
getCommitInfo(Project.NameKey project, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.revwalk.RevCommit commit, boolean addLinks, boolean fillCommit)
Returns aCommitInfo
based on a commit and formatting options.RevisionInfo
getRevisionInfo(ChangeData cd, PatchSet in)
Returns aRevisionInfo
based on a change and patch set.
-
-
-
Method Detail
-
getRevisionInfo
public RevisionInfo getRevisionInfo(ChangeData cd, PatchSet in) throws PatchListNotAvailableException, GpgException, IOException, PermissionBackendException
Returns aRevisionInfo
based on a change and patch set. Reads from the repository depending on the options provided when constructing this instance.
-
getCommitInfo
public CommitInfo getCommitInfo(Project.NameKey project, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.revwalk.RevCommit commit, boolean addLinks, boolean fillCommit) throws IOException
Returns aCommitInfo
based on a commit and formatting options. Uses the provided RevWalk and assumes it is backed by an open repository.- Throws:
IOException
-
-