public interface ChangeApi
| Modifier and Type | Interface and Description |
|---|---|
static class |
ChangeApi.NotImplemented
A default implementation which allows source compatibility when adding new methods to the
interface.
|
static class |
ChangeApi.SuggestedReviewersRequest |
| Modifier and Type | Method and Description |
|---|---|
void |
abandon() |
void |
abandon(AbandonInput in) |
AddReviewerResult |
addReviewer(AddReviewerInput in) |
AddReviewerResult |
addReviewer(String in) |
ChangeInfo |
check() |
ChangeInfo |
check(FixInput fix) |
Map<String,List<CommentInfo>> |
comments()
Get all published comments on a change.
|
List<CommentInfo> |
commentsAsList()
Get all published comments on a change as a list.
|
ChangeInfo |
createMergePatchSet(MergePatchSetInput in)
Create a merge patch set for the change.
|
RevisionApi |
current()
Look up the current revision for the change.
|
void |
delete()
Deletes a change.
|
AccountInfo |
deleteAssignee()
Delete the assignee of a change.
|
Map<String,List<CommentInfo>> |
drafts()
Get all draft comments for the current user on a change.
|
List<CommentInfo> |
draftsAsList()
Get all draft comments for the current user on a change as a list.
|
ChangeEditApi |
edit()
Provides access to an API regarding the change edit of this change.
|
ChangeInfo |
get()
get(ListChangesOption...) with all options included, except for the following. |
ChangeInfo |
get(EnumSet<ListChangesOption> options) |
default ChangeInfo |
get(Iterable<ListChangesOption> options) |
default ChangeInfo |
get(ListChangesOption... options) |
AccountInfo |
getAssignee()
Get the assignee of a change.
|
EditInfo |
getEdit()
Deprecated.
Replaced by
edit() in combination with ChangeEditApi.get(). |
Set<String> |
getHashtags()
Get hashtags on a change.
|
List<AccountInfo> |
getPastAssignees()
Get all past assignees.
|
String |
id() |
void |
ignore(boolean ignore)
Ignore or un-ignore this change.
|
boolean |
ignored()
Check if this change is ignored.
|
IncludedInInfo |
includedIn() |
void |
index() |
ChangeInfo |
info()
get(ListChangesOption...) with no options included. |
void |
markAsReviewed(boolean reviewed)
Mark this change as reviewed/unreviewed.
|
ChangeMessageApi |
message(String id)
Look up a change message of a change by its id.
|
List<ChangeMessageInfo> |
messages()
Get all messages of a change with detailed account info.
|
void |
move(MoveInput in) |
void |
move(String destination) |
void |
publish()
Deprecated.
|
PureRevertInfo |
pureRevert()
Check if this change is a pure revert of the change stored in revertOf.
|
PureRevertInfo |
pureRevert(String claimedOriginal)
Check if this change is a pure revert of claimedOriginal (SHA1 in 40 digit hex).
|
void |
rebase()
Rebase the current revision of a change using default options.
|
void |
rebase(RebaseInput in)
Rebase the current revision of a change.
|
void |
restore() |
void |
restore(RestoreInput in) |
ChangeApi |
revert()
Create a new change that reverts this change.
|
ChangeApi |
revert(RevertInput in)
Create a new change that reverts this change.
|
ReviewerApi |
reviewer(String id)
Look up the reviewer of the change.
|
List<ReviewerInfo> |
reviewers()
Retrieve reviewers (
ReviewerState.REVIEWER and ReviewerState.CC) on the change. |
RevisionApi |
revision(int id)
Look up a revision of a change by number.
|
RevisionApi |
revision(String id)
Look up a revision of a change by commit SHA-1.
|
Map<String,List<RobotCommentInfo>> |
robotComments()
Get all robot comments on a change.
|
AccountInfo |
setAssignee(AssigneeInput input)
Set the assignee of a change.
|
void |
setHashtags(HashtagsInput input)
Set hashtags on a change
|
void |
setMessage(CommitMessageInput in)
Create a new patch set with a new commit message.
|
void |
setMessage(String message)
Create a new patch set with a new commit message.
|
default void |
setPrivate(boolean value) |
void |
setPrivate(boolean value,
String message) |
default void |
setReadyForReview() |
void |
setReadyForReview(String message) |
default void |
setWorkInProgress() |
void |
setWorkInProgress(String message) |
List<ChangeInfo> |
submittedTogether() |
SubmittedTogetherInfo |
submittedTogether(EnumSet<ListChangesOption> listOptions,
EnumSet<SubmittedTogetherOption> submitOptions) |
SubmittedTogetherInfo |
submittedTogether(EnumSet<SubmittedTogetherOption> options) |
ChangeApi.SuggestedReviewersRequest |
suggestReviewers() |
ChangeApi.SuggestedReviewersRequest |
suggestReviewers(String query) |
String |
topic() |
void |
topic(String topic) |
String id()
RevisionApi current() throws RestApiException
Note: This method eagerly reads the revision. Methods that mutate the
revision do not necessarily re-read the revision. Therefore, calling a getter method on an
instance after calling a mutation method on that same instance is not guaranteed to reflect the
mutation. It is not recommended to store references to RevisionApi instances.
RestApiException - if an error occurred.RevisionApi revision(int id) throws RestApiException
RestApiExceptioncurrent()RevisionApi revision(String id) throws RestApiException
RestApiExceptioncurrent()ReviewerApi reviewer(String id) throws RestApiException
id - ID of the account, can be a string of the format "Full Name
<[email protected]>", just the email address, a full name if it is unique, an account
ID, a user name or 'self' for the calling user.RestApiException - if id is not account ID or is a user that isn't known to be a reviewer
for this change.void abandon()
throws RestApiException
RestApiExceptionvoid abandon(AbandonInput in) throws RestApiException
RestApiExceptionvoid restore()
throws RestApiException
RestApiExceptionvoid restore(RestoreInput in) throws RestApiException
RestApiExceptionvoid move(String destination) throws RestApiException
RestApiExceptionvoid move(MoveInput in) throws RestApiException
RestApiExceptionvoid setPrivate(boolean value,
String message)
throws RestApiException
RestApiExceptiondefault void setPrivate(boolean value)
throws RestApiException
RestApiExceptionvoid setWorkInProgress(String message) throws RestApiException
RestApiExceptionvoid setReadyForReview(String message) throws RestApiException
RestApiExceptiondefault void setWorkInProgress()
throws RestApiException
RestApiExceptiondefault void setReadyForReview()
throws RestApiException
RestApiExceptionvoid ignore(boolean ignore)
throws RestApiException
ignore - ignore the change if trueRestApiExceptionboolean ignored()
throws RestApiException
RestApiExceptionvoid markAsReviewed(boolean reviewed)
throws RestApiException
reviewed - flag to decide if this change should be marked as reviewed (true) or
unreviewed (false)RestApiExceptionChangeApi revert() throws RestApiException
RestApiExceptionChanges.id(int)ChangeApi revert(RevertInput in) throws RestApiException
RestApiExceptionChanges.id(int)ChangeInfo createMergePatchSet(MergePatchSetInput in) throws RestApiException
RestApiExceptionList<ChangeInfo> submittedTogether() throws RestApiException
RestApiExceptionSubmittedTogetherInfo submittedTogether(EnumSet<SubmittedTogetherOption> options) throws RestApiException
RestApiExceptionSubmittedTogetherInfo submittedTogether(EnumSet<ListChangesOption> listOptions, EnumSet<SubmittedTogetherOption> submitOptions) throws RestApiException
RestApiException@Deprecated void publish() throws RestApiException
RestApiExceptionvoid rebase()
throws RestApiException
RestApiExceptionvoid rebase(RebaseInput in) throws RestApiException
RestApiExceptionvoid delete()
throws RestApiException
RestApiExceptionString topic() throws RestApiException
RestApiExceptionvoid topic(String topic) throws RestApiException
RestApiExceptionIncludedInInfo includedIn() throws RestApiException
RestApiExceptionAddReviewerResult addReviewer(AddReviewerInput in) throws RestApiException
RestApiExceptionAddReviewerResult addReviewer(String in) throws RestApiException
RestApiExceptionChangeApi.SuggestedReviewersRequest suggestReviewers() throws RestApiException
RestApiExceptionChangeApi.SuggestedReviewersRequest suggestReviewers(String query) throws RestApiException
RestApiExceptionList<ReviewerInfo> reviewers() throws RestApiException
ReviewerState.REVIEWER and ReviewerState.CC) on the change.RestApiExceptionChangeInfo get(EnumSet<ListChangesOption> options) throws RestApiException
RestApiExceptiondefault ChangeInfo get(Iterable<ListChangesOption> options) throws RestApiException
RestApiExceptiondefault ChangeInfo get(ListChangesOption... options) throws RestApiException
RestApiExceptionChangeInfo get() throws RestApiException
get(ListChangesOption...) with all options included, except for the following.
CHECK is omitted, to skip consistency checks.
SKIP_MERGEABLE is omitted, so the mergeable bit is set.
RestApiExceptionChangeInfo info() throws RestApiException
get(ListChangesOption...) with no options included.RestApiException@Deprecated EditInfo getEdit() throws RestApiException
edit() in combination with ChangeEditApi.get().RestApiExceptionChangeEditApi edit() throws RestApiException
ChangeEditApi for the change edit of this changeRestApiException - if the API isn't accessiblevoid setMessage(String message) throws RestApiException
RestApiExceptionvoid setMessage(CommitMessageInput in) throws RestApiException
RestApiExceptionvoid setHashtags(HashtagsInput input) throws RestApiException
RestApiExceptionSet<String> getHashtags() throws RestApiException
RestApiExceptionAccountInfo setAssignee(AssigneeInput input) throws RestApiException
RestApiExceptionAccountInfo getAssignee() throws RestApiException
RestApiExceptionList<AccountInfo> getPastAssignees() throws RestApiException
RestApiExceptionAccountInfo deleteAssignee() throws RestApiException
RestApiExceptionMap<String,List<CommentInfo>> comments() throws RestApiException
revision field set to
indicate their patch set.RestApiExceptionList<CommentInfo> commentsAsList() throws RestApiException
revision field set to indicate their
patch set.RestApiExceptionMap<String,List<RobotCommentInfo>> robotComments() throws RestApiException
revision field
set to indicate their patch set.RestApiExceptionMap<String,List<CommentInfo>> drafts() throws RestApiException
revision field set to indicate
their patch set.RestApiExceptionList<CommentInfo> draftsAsList() throws RestApiException
revision field set to indicate their patch
set.RestApiExceptionChangeInfo check() throws RestApiException
RestApiExceptionChangeInfo check(FixInput fix) throws RestApiException
RestApiExceptionvoid index()
throws RestApiException
RestApiExceptionPureRevertInfo pureRevert() throws RestApiException
RestApiExceptionPureRevertInfo pureRevert(String claimedOriginal) throws RestApiException
RestApiExceptionList<ChangeMessageInfo> messages() throws RestApiException
RestApiExceptionChangeMessageApi message(String id) throws RestApiException
id - the id of the change message. Note that in NoteDb, this id is the ObjectId of
a commit on the change meta branch. In ReviewDb, it's a UUID generated randomly. That means
a change message id could be different between NoteDb and ReviewDb.RestApiException - if the id is invalid.