Support to retrieve a branch via REST
GET on /projects/<project-name>/branches/<branch-id> retrieves a branch. Change-Id: I1c2c81dcc5292d644d8048436c142039a4274e32 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -15,21 +15,21 @@
|
||||
package com.google.gerrit.server.project;
|
||||
|
||||
import com.google.gerrit.extensions.restapi.RestView;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.server.project.ListBranches.BranchInfo;
|
||||
import com.google.inject.TypeLiteral;
|
||||
|
||||
public class BranchResource extends ProjectResource {
|
||||
public static final TypeLiteral<RestView<BranchResource>> BRANCH_KIND =
|
||||
new TypeLiteral<RestView<BranchResource>>() {};
|
||||
|
||||
private final Branch.NameKey branch;
|
||||
private final BranchInfo branchInfo;
|
||||
|
||||
public BranchResource(ProjectControl control, Branch.NameKey branch) {
|
||||
public BranchResource(ProjectControl control, BranchInfo branchInfo) {
|
||||
super(control);
|
||||
this.branch = branch;
|
||||
this.branchInfo = branchInfo;
|
||||
}
|
||||
|
||||
public Branch.NameKey getBranch() {
|
||||
return branch;
|
||||
public BranchInfo getBranchInfo() {
|
||||
return branchInfo;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user