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
RestApiException
current()
RevisionApi revision(java.lang.String id) throws RestApiException
RestApiException
current()
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
RestApiException
void abandon(AbandonInput in) throws RestApiException
RestApiException
default void restore() throws RestApiException
RestApiException
void restore(RestoreInput in) throws RestApiException
RestApiException
default void move(java.lang.String destination) throws RestApiException
RestApiException
void move(MoveInput in) throws RestApiException
RestApiException
void setPrivate(boolean value, java.lang.String message) throws RestApiException
RestApiException
default void setPrivate(boolean value) throws RestApiException
RestApiException
void setWorkInProgress(java.lang.String message) throws RestApiException
RestApiException
void setReadyForReview(java.lang.String message) throws RestApiException
RestApiException
default void setWorkInProgress() throws RestApiException
RestApiException
default void setReadyForReview() throws RestApiException
RestApiException
void ignore(boolean ignore) throws RestApiException
ignore
- ignore the change if trueRestApiException
boolean ignored() throws RestApiException
RestApiException
void markAsReviewed(boolean reviewed) throws RestApiException
reviewed
- flag to decide if this change should be marked as reviewed (true
) or
unreviewed (false
)RestApiException
default ChangeApi revert() throws RestApiException
RestApiException
Changes.id(int)
ChangeApi revert(RevertInput in) throws RestApiException
RestApiException
Changes.id(int)
ChangeInfo createMergePatchSet(MergePatchSetInput in) throws RestApiException
RestApiException
default java.util.List<ChangeInfo> submittedTogether() throws RestApiException
RestApiException
default SubmittedTogetherInfo submittedTogether(java.util.EnumSet<SubmittedTogetherOption> options) throws RestApiException
RestApiException
SubmittedTogetherInfo submittedTogether(java.util.EnumSet<ListChangesOption> listOptions, java.util.EnumSet<SubmittedTogetherOption> submitOptions) throws RestApiException
RestApiException
default void rebase() throws RestApiException
RestApiException
void rebase(RebaseInput in) throws RestApiException
RestApiException
void delete() throws RestApiException
RestApiException
java.lang.String topic() throws RestApiException
RestApiException
void topic(java.lang.String topic) throws RestApiException
RestApiException
IncludedInInfo includedIn() throws RestApiException
RestApiException
default AddReviewerResult addReviewer(java.lang.String reviewer) throws RestApiException
RestApiException
AddReviewerResult addReviewer(AddReviewerInput in) throws RestApiException
RestApiException
ChangeApi.SuggestedReviewersRequest suggestReviewers() throws RestApiException
RestApiException
default ChangeApi.SuggestedReviewersRequest suggestReviewers(java.lang.String query) throws RestApiException
RestApiException
java.util.List<ReviewerInfo> reviewers() throws RestApiException
ReviewerState.REVIEWER
and ReviewerState.CC
) on the change.RestApiException
ChangeInfo get(java.util.EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) throws RestApiException
RestApiException
default ChangeInfo get(com.google.common.collect.ImmutableListMultimap<java.lang.String,java.lang.String> pluginOptions) throws RestApiException
RestApiException
default ChangeInfo get(java.util.EnumSet<ListChangesOption> options) throws RestApiException
RestApiException
default ChangeInfo get(java.lang.Iterable<ListChangesOption> options) throws RestApiException
RestApiException
default ChangeInfo get(ListChangesOption... options) throws RestApiException
RestApiException
default 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.
RestApiException
default ChangeInfo info() throws RestApiException
get(ListChangesOption...)
with no options included.RestApiException
ChangeEditApi 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
RestApiException
void setMessage(CommitMessageInput in) throws RestApiException
RestApiException
void setHashtags(HashtagsInput input) throws RestApiException
RestApiException
java.util.Set<java.lang.String> getHashtags() throws RestApiException
RestApiException
AccountInfo setAssignee(AssigneeInput input) throws RestApiException
RestApiException
AccountInfo getAssignee() throws RestApiException
RestApiException
java.util.List<AccountInfo> getPastAssignees() throws RestApiException
RestApiException
AccountInfo deleteAssignee() throws RestApiException
RestApiException
java.util.Map<java.lang.String,java.util.List<CommentInfo>> comments() throws RestApiException
revision
field set to
indicate their patch set.RestApiException
java.util.List<CommentInfo> commentsAsList() throws RestApiException
revision
field set to indicate their
patch set.RestApiException
java.util.Map<java.lang.String,java.util.List<RobotCommentInfo>> robotComments() throws RestApiException
revision
field
set to indicate their patch set.RestApiException
java.util.Map<java.lang.String,java.util.List<CommentInfo>> drafts() throws RestApiException
revision
field set to indicate
their patch set.RestApiException
java.util.List<CommentInfo> draftsAsList() throws RestApiException
revision
field set to indicate their patch
set.RestApiException
ChangeInfo check() throws RestApiException
RestApiException
ChangeInfo check(FixInput fix) throws RestApiException
RestApiException
void index() throws RestApiException
RestApiException
PureRevertInfo pureRevert() throws RestApiException
RestApiException
PureRevertInfo pureRevert(java.lang.String claimedOriginal) throws RestApiException
RestApiException
java.util.List<ChangeMessageInfo> messages() throws RestApiException
RestApiException
ChangeMessageApi 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.