public class ProjectControl
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ProjectControl.AssistedFactory |
static class |
ProjectControl.Factory |
static class |
ProjectControl.GenericFactory |
Modifier and Type | Method and Description |
---|---|
boolean |
allRefsAreVisible()
Can this user see all the refs in this projects?
|
boolean |
allRefsAreVisible(java.util.Set<java.lang.String> ignore) |
boolean |
canAddRefs() |
com.google.gerrit.common.data.Capable |
canPushToAtLeastOneRef() |
boolean |
canReadCommit(com.google.gerrit.reviewdb.server.ReviewDb db,
org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.revwalk.RevCommit commit) |
boolean |
canRunReceivePack() |
boolean |
canRunUploadPack() |
boolean |
canUpload() |
ChangeControl |
controlFor(ChangeNotes notes) |
ChangeControl |
controlFor(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.Change change) |
ChangeControl |
controlForIndexedChange(com.google.gerrit.reviewdb.client.Change change)
Create a change control for a change that was loaded from index.
|
RefControl |
controlForRef(com.google.gerrit.reviewdb.client.Branch.NameKey ref) |
RefControl |
controlForRef(java.lang.String refName) |
ProjectControl |
forUser(CurrentUser who) |
java.util.Set<com.google.gerrit.common.data.GroupReference> |
getAllGroups() |
com.google.gerrit.common.data.LabelTypes |
getLabelTypes() |
java.util.Set<com.google.gerrit.common.data.GroupReference> |
getLocalGroups() |
com.google.gerrit.reviewdb.client.Project |
getProject() |
ProjectState |
getProjectState() |
CurrentUser |
getUser() |
boolean |
isHidden()
Returns whether the project is hidden.
|
boolean |
isOwner()
Is this user a project owner? Ownership does not imply
isVisible() |
boolean |
isOwnerAnyRef()
Does this user have ownership on at least one reference name?
|
boolean |
isReadable()
Returns whether the project is readable to the current user.
|
boolean |
isVisible()
Returns whether the project is accessible to the current user, i.e.
|
public static final int VISIBLE
public static final int OWNER
public ProjectControl forUser(CurrentUser who)
public ChangeControl controlFor(com.google.gerrit.reviewdb.server.ReviewDb db, com.google.gerrit.reviewdb.client.Change change) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public ChangeControl controlForIndexedChange(com.google.gerrit.reviewdb.client.Change change)
change
- change loaded from secondary indexpublic ChangeControl controlFor(ChangeNotes notes)
public RefControl controlForRef(com.google.gerrit.reviewdb.client.Branch.NameKey ref)
public RefControl controlForRef(java.lang.String refName)
public CurrentUser getUser()
public ProjectState getProjectState()
public com.google.gerrit.reviewdb.client.Project getProject()
public com.google.gerrit.common.data.LabelTypes getLabelTypes()
public boolean isHidden()
public boolean isReadable()
public boolean isVisible()
public boolean canAddRefs()
public boolean canUpload()
public boolean allRefsAreVisible()
public boolean allRefsAreVisible(java.util.Set<java.lang.String> ignore)
public boolean isOwner()
isVisible()
public boolean isOwnerAnyRef()
public com.google.gerrit.common.data.Capable canPushToAtLeastOneRef()
public java.util.Set<com.google.gerrit.common.data.GroupReference> getAllGroups()
public java.util.Set<com.google.gerrit.common.data.GroupReference> getLocalGroups()
public boolean canRunUploadPack()
public boolean canRunReceivePack()
public boolean canReadCommit(com.google.gerrit.reviewdb.server.ReviewDb db, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevCommit commit)