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 |
|---|---|
default void |
abandon() |
void |
abandon(AbandonInput in) |
AddReviewerResult |
addReviewer(AddReviewerInput in) |
default AddReviewerResult |
addReviewer(java.lang.String reviewer) |
ChangeInfo |
check() |
ChangeInfo |
check(FixInput fix) |
java.util.Map<java.lang.String,java.util.List<CommentInfo>> |
comments()
Get all published comments on a change.
|
java.util.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.
|
default RevisionApi |
current()
Look up the current revision for the change.
|
void |
delete()
Deletes a change.
|
AccountInfo |
deleteAssignee()
Delete the assignee of a change.
|
java.util.Map<java.lang.String,java.util.List<CommentInfo>> |
drafts()
Get all draft comments for the current user on a change.
|
java.util.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.
|
default ChangeInfo |
get()
get(ListChangesOption...) with all options included, except for the following. |
default ChangeInfo |
get(java.util.EnumSet<ListChangesOption> options) |
ChangeInfo |
get(java.util.EnumSet<ListChangesOption> options,
com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) |
default ChangeInfo |
get(com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) |
default ChangeInfo |
get(java.lang.Iterable<ListChangesOption> options) |
default ChangeInfo |
get(ListChangesOption... options) |
AccountInfo |
getAssignee()
Get the assignee of a change.
|
java.util.Set<java.lang.String> |
getHashtags()
Get hashtags on a change.
|
java.util.List<AccountInfo> |
getPastAssignees()
Get all past assignees.
|
java.lang.String |
id() |
void |
ignore(boolean ignore)
Ignore or un-ignore this change.
|
boolean |
ignored()
Check if this change is ignored.
|
IncludedInInfo |
includedIn() |
void |
index() |
default ChangeInfo |
info()
get(ListChangesOption...) with no options included. |
void |
markAsReviewed(boolean reviewed)
Mark this change as reviewed/unreviewed.
|
ChangeMessageApi |
message(java.lang.String id)
Look up a change message of a change by its id.
|
java.util.List<ChangeMessageInfo> |
messages()
Get all messages of a change with detailed account info.
|
void |
move(MoveInput in) |
default void |
move(java.lang.String destination) |
PureRevertInfo |
pureRevert()
Check if this change is a pure revert of the change stored in revertOf.
|
PureRevertInfo |
pureRevert(java.lang.String claimedOriginal)
Check if this change is a pure revert of claimedOriginal (SHA1 in 40 digit hex).
|
default void |
rebase()
Rebase the current revision of a change using default options.
|
void |
rebase(RebaseInput in)
Rebase the current revision of a change.
|
default void |
restore() |
void |
restore(RestoreInput in) |
default ChangeApi |
revert()
Create a new change that reverts this change.
|
ChangeApi |
revert(RevertInput in)
Create a new change that reverts this change.
|
ReviewerApi |
reviewer(java.lang.String id)
Look up the reviewer of the change.
|
java.util.List<ReviewerInfo> |
reviewers()
Retrieve reviewers (
ReviewerState.REVIEWER and ReviewerState.CC) on the change. |
default RevisionApi |
revision(int id)
Look up a revision of a change by number.
|
RevisionApi |
revision(java.lang.String id)
Look up a revision of a change by commit SHA-1 or other supported revision string.
|
java.util.Map<java.lang.String,java.util.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.
|
default void |
setMessage(java.lang.String message)
Create a new patch set with a new commit message.
|
default void |
setPrivate(boolean value) |
void |
setPrivate(boolean value,
java.lang.String message) |
default void |
setReadyForReview() |
void |
setReadyForReview(java.lang.String message) |
default void |
setWorkInProgress() |
void |
setWorkInProgress(java.lang.String message) |
default java.util.List<ChangeInfo> |
submittedTogether() |
SubmittedTogetherInfo |
submittedTogether(java.util.EnumSet<ListChangesOption> listOptions,
java.util.EnumSet<SubmittedTogetherOption> submitOptions) |
default SubmittedTogetherInfo |
submittedTogether(java.util.EnumSet<SubmittedTogetherOption> options) |
ChangeApi.SuggestedReviewersRequest |
suggestReviewers() |
default ChangeApi.SuggestedReviewersRequest |
suggestReviewers(java.lang.String query) |
java.lang.String |
topic() |
void |
topic(java.lang.String topic) |
java.lang.String id()
default 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.default RevisionApi revision(int id) throws RestApiException
RestApiExceptioncurrent()RevisionApi revision(java.lang.String id) throws RestApiException
RestApiExceptioncurrent()ReviewerApi reviewer(java.lang.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.default void abandon()
throws RestApiException
RestApiExceptionvoid abandon(AbandonInput in) throws RestApiException
RestApiExceptiondefault void restore()
throws RestApiException
RestApiExceptionvoid restore(RestoreInput in) throws RestApiException
RestApiExceptiondefault void move(java.lang.String destination)
throws RestApiException
RestApiExceptionvoid move(MoveInput in) throws RestApiException
RestApiExceptionvoid setPrivate(boolean value,
java.lang.String message)
throws RestApiException
RestApiExceptiondefault void setPrivate(boolean value)
throws RestApiException
RestApiExceptionvoid setWorkInProgress(java.lang.String message)
throws RestApiException
RestApiExceptionvoid setReadyForReview(java.lang.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)RestApiExceptiondefault ChangeApi revert() throws RestApiException
RestApiExceptionChanges.id(int)ChangeApi revert(RevertInput in) throws RestApiException
RestApiExceptionChanges.id(int)ChangeInfo createMergePatchSet(MergePatchSetInput in) throws RestApiException
RestApiExceptiondefault java.util.List<ChangeInfo> submittedTogether() throws RestApiException
RestApiExceptiondefault SubmittedTogetherInfo submittedTogether(java.util.EnumSet<SubmittedTogetherOption> options) throws RestApiException
RestApiExceptionSubmittedTogetherInfo submittedTogether(java.util.EnumSet<ListChangesOption> listOptions, java.util.EnumSet<SubmittedTogetherOption> submitOptions) throws RestApiException
RestApiExceptiondefault void rebase()
throws RestApiException
RestApiExceptionvoid rebase(RebaseInput in) throws RestApiException
RestApiExceptionvoid delete()
throws RestApiException
RestApiExceptionjava.lang.String topic()
throws RestApiException
RestApiExceptionvoid topic(java.lang.String topic)
throws RestApiException
RestApiExceptionIncludedInInfo includedIn() throws RestApiException
RestApiExceptiondefault AddReviewerResult addReviewer(java.lang.String reviewer) throws RestApiException
RestApiExceptionAddReviewerResult addReviewer(AddReviewerInput in) throws RestApiException
RestApiExceptionChangeApi.SuggestedReviewersRequest suggestReviewers() throws RestApiException
RestApiExceptiondefault ChangeApi.SuggestedReviewersRequest suggestReviewers(java.lang.String query) throws RestApiException
RestApiExceptionjava.util.List<ReviewerInfo> reviewers() throws RestApiException
ReviewerState.REVIEWER and ReviewerState.CC) on the change.RestApiExceptionChangeInfo get(java.util.EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) throws RestApiException
RestApiExceptiondefault ChangeInfo get(com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) throws RestApiException
RestApiExceptiondefault ChangeInfo get(java.util.EnumSet<ListChangesOption> options) throws RestApiException
RestApiExceptiondefault ChangeInfo get(java.lang.Iterable<ListChangesOption> options) throws RestApiException
RestApiExceptiondefault ChangeInfo get(ListChangesOption... options) throws RestApiException
RestApiExceptiondefault ChangeInfo 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.
RestApiExceptiondefault ChangeInfo info() throws RestApiException
get(ListChangesOption...) with no options included.RestApiExceptionChangeEditApi edit() throws RestApiException
ChangeEditApi for the change edit of this changeRestApiException - if the API isn't accessibledefault void setMessage(java.lang.String message)
throws RestApiException
RestApiExceptionvoid setMessage(CommitMessageInput in) throws RestApiException
RestApiExceptionvoid setHashtags(HashtagsInput input) throws RestApiException
RestApiExceptionjava.util.Set<java.lang.String> getHashtags()
throws RestApiException
RestApiExceptionAccountInfo setAssignee(AssigneeInput input) throws RestApiException
RestApiExceptionAccountInfo getAssignee() throws RestApiException
RestApiExceptionjava.util.List<AccountInfo> getPastAssignees() throws RestApiException
RestApiExceptionAccountInfo deleteAssignee() throws RestApiException
RestApiExceptionjava.util.Map<java.lang.String,java.util.List<CommentInfo>> comments() throws RestApiException
revision field set to
indicate their patch set.RestApiExceptionjava.util.List<CommentInfo> commentsAsList() throws RestApiException
revision field set to indicate their
patch set.RestApiExceptionjava.util.Map<java.lang.String,java.util.List<RobotCommentInfo>> robotComments() throws RestApiException
revision field
set to indicate their patch set.RestApiExceptionjava.util.Map<java.lang.String,java.util.List<CommentInfo>> drafts() throws RestApiException
revision field set to indicate
their patch set.RestApiExceptionjava.util.List<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(java.lang.String claimedOriginal) throws RestApiException
RestApiExceptionjava.util.List<ChangeMessageInfo> messages() throws RestApiException
RestApiExceptionChangeMessageApi message(java.lang.String id) throws RestApiException
id - the id of the change message. In NoteDb, this id is the ObjectId of a commit
on the change meta branch.RestApiException - if the id is invalid.