public static enum Change.Status extends java.lang.Enum<Change.Status>
Within the database, lower case codes ('a'..'z') indicate a change that is still open, and that can be modified/refined further, while upper case codes ('A'..'Z') indicate a change that is closed and cannot be further modified.
Enum Constant and Description |
---|
ABANDONED
Change is closed, but was not submitted to its destination branch.
|
DRAFT
Change is a draft change that only consists of draft patchsets.
|
MERGED
Change is closed, and submitted to its destination branch.
|
NEW
Change is open and pending review, or review is in progress.
|
Modifier and Type | Method and Description |
---|---|
ChangeStatus |
asChangeStatus() |
static Change.Status |
forChangeStatus(ChangeStatus cs) |
static Change.Status |
forCode(char c) |
char |
getCode() |
boolean |
isClosed() |
boolean |
isOpen() |
static Change.Status |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Change.Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Change.Status NEW
This is the default state assigned to a change when it is first created in the database. A change stays in the NEW state throughout its review cycle, until the change is submitted or abandoned.
Changes in the NEW state can be moved to:
public static final Change.Status DRAFT
This is a change that is not meant to be submitted or reviewed yet. If the uploader publishes the change, it becomes a NEW change. Publishing is a one-way action, a change cannot return to DRAFT status. Draft changes are only visible to the uploader and those explicitly added as reviewers.
Changes in the DRAFT state can be moved to:
NEW
- when the change is published, it becomes a new change;
public static final Change.Status MERGED
Once a change has been merged, it cannot be further modified by adding a replacement patch set. Draft comments however may be published, supporting a post-submit review.
public static final Change.Status ABANDONED
Once a change has been abandoned, it cannot be further modified by adding a replacement patch set, and it cannot be merged. Draft comments however may be published, permitting reviewers to send constructive feedback.
public static Change.Status[] values()
for (Change.Status c : Change.Status.values()) System.out.println(c);
public static Change.Status valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic char getCode()
public boolean isOpen()
public boolean isClosed()
public ChangeStatus asChangeStatus()
public static Change.Status forCode(char c)
public static Change.Status forChangeStatus(ChangeStatus cs)