public class ChangeControl extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ChangeControl.Factory |
static class |
ChangeControl.GenericFactory |
Modifier and Type | Method and Description |
---|---|
boolean |
canAbandon(ReviewDb db)
Can this user abandon this change?
|
boolean |
canAddPatchSet(ReviewDb db)
Can this user add a patch set to this change?
|
boolean |
canDelete(ReviewDb db,
Change.Status status)
Can this user delete this change or any patch set of this change?
|
boolean |
canEditAssignee() |
boolean |
canEditDescription()
Can this user edit the description?
|
boolean |
canEditHashtags()
Can this user edit the hashtag name?
|
boolean |
canEditTopicName()
Can this user edit the topic name?
|
boolean |
canMoveTo(String ref,
ReviewDb db)
Can this user change the destination branch of this change to the new ref?
|
boolean |
canPublish(ReviewDb db)
Can this user publish this draft change or any draft patch set of this change?
|
boolean |
canRebase(ReviewDb db)
Can this user rebase this change?
|
boolean |
canRemoveReviewer(Account.Id reviewer,
int value) |
boolean |
canRemoveReviewer(PatchSetApproval approval) |
boolean |
canRestore(ReviewDb db)
Can this user restore this change?
|
boolean |
canSubmit() |
boolean |
canSubmitAs() |
ChangeControl |
forUser(CurrentUser who) |
Change |
getChange() |
Change.Id |
getId() |
List<PermissionRange> |
getLabelRanges()
All value ranges of any allowed label permission.
|
LabelTypes |
getLabelTypes()
All available label types for this change.
|
ChangeNotes |
getNotes() |
Project |
getProject() |
ProjectControl |
getProjectControl() |
PermissionRange |
getRange(String permission)
The range of permitted values associated with a label permission.
|
RefControl |
getRefControl() |
CurrentUser |
getUser() |
boolean |
isAdmin() |
boolean |
isAssignee()
Is this user assigned to this change?
|
boolean |
isDraftVisible(ReviewDb db,
ChangeData cd) |
boolean |
isOwner()
Is this user the owner of the change?
|
boolean |
isPatchSetLocked(ReviewDb db)
Is the current patch set locked against state changes?
|
boolean |
isPatchVisible(PatchSet ps,
ChangeData cd)
Can this user see the given patchset?
|
boolean |
isPatchVisible(PatchSet ps,
ReviewDb db)
Can this user see the given patchset?
|
boolean |
isRefVisible()
Can the user see this change? Does not account for draft status
|
boolean |
isReviewer(ReviewDb db)
Is this user a reviewer for the change?
|
boolean |
isReviewer(ReviewDb db,
ChangeData cd)
Is this user a reviewer for the change?
|
boolean |
isVisible(ReviewDb db)
Can this user see this change?
|
boolean |
isVisible(ReviewDb db,
ChangeData cd)
Can this user see this change?
|
public ChangeControl forUser(CurrentUser who)
public RefControl getRefControl()
public CurrentUser getUser()
public ProjectControl getProjectControl()
public Project getProject()
public Change.Id getId()
public Change getChange()
public ChangeNotes getNotes()
public boolean isVisible(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isVisible(ReviewDb db, ChangeData cd) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isRefVisible()
public boolean isPatchVisible(PatchSet ps, ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isPatchVisible(PatchSet ps, ChangeData cd) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canAbandon(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canMoveTo(String ref, ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canPublish(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canDelete(ReviewDb db, Change.Status status) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canRebase(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean canRestore(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public LabelTypes getLabelTypes()
public List<PermissionRange> getLabelRanges()
public PermissionRange getRange(String permission)
public boolean canAddPatchSet(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isPatchSetLocked(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isOwner()
public boolean isAssignee()
public boolean isReviewer(ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isReviewer(ReviewDb db, ChangeData cd) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isAdmin()
public boolean canRemoveReviewer(PatchSetApproval approval)
public boolean canRemoveReviewer(Account.Id reviewer, int value)
public boolean canEditTopicName()
public boolean canEditDescription()
public boolean canEditAssignee()
public boolean canEditHashtags()
public boolean canSubmit()
public boolean canSubmitAs()
public boolean isDraftVisible(ReviewDb db, ChangeData cd) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException