Interface ChangeApi
- 
- All Known Implementing Classes:
- ChangeApi.NotImplemented
 
 public interface ChangeApi
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classChangeApi.CommentsRequeststatic classChangeApi.DraftsRequeststatic classChangeApi.NotImplementedA default implementation which allows source compatibility when adding new methods to the interface.static classChangeApi.SuggestedReviewersRequest
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidabandon()voidabandon(AbandonInput in)ReviewerResultaddReviewer(ReviewerInput in)default ReviewerResultaddReviewer(String reviewer)AccountInfoaddToAttentionSet(AttentionSetInput input)Adds a user to the attention set.AttentionSetApiattention(String id)Manage the attention set.ChangeInfocheck()ChangeInfocheck(FixInput fix)SubmitRequirementResultInfocheckSubmitRequirement(SubmitRequirementInput input)Returns the result of evaluating theSubmitRequirementInputinput on the change.default Map<String,List<CommentInfo>>comments()Deprecated.Callers should usecommentsRequest()insteaddefault List<CommentInfo>commentsAsList()Deprecated.Callers should usecommentsRequest()insteadChangeApi.CommentsRequestcommentsRequest()Get aChangeApi.CommentsRequestentity that can be used to retrieve published comments.ChangeInfocreateMergePatchSet(MergePatchSetInput in)Create a merge patch set for the change.default RevisionApicurrent()Look up the current revision for the change.voiddelete()Deletes a change.AccountInfodeleteAssignee()Delete the assignee of a change.default Map<String,List<CommentInfo>>drafts()Get all draft comments for the current user on a change.default List<CommentInfo>draftsAsList()Get all draft comments for the current user on a change as a list.ChangeApi.DraftsRequestdraftsRequest()Get aChangeApi.DraftsRequestentity that can be used to retrieve draft comments.ChangeEditApiedit()Provides access to an API regarding the change edit of this change.default ChangeInfoget()get(ListChangesOption...)with all options included, except for the following.default ChangeInfoget(com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions)default ChangeInfoget(ListChangesOption... options)default ChangeInfoget(Iterable<ListChangesOption> options)default ChangeInfoget(EnumSet<ListChangesOption> options)ChangeInfoget(EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions)AccountInfogetAssignee()Get the assignee of a change.Set<String>getHashtags()Get hashtags on a change.List<AccountInfo>getPastAssignees()Get all past assignees.Stringid()voidignore(boolean ignore)Ignore or un-ignore this change.booleanignored()Check if this change is ignored.IncludedInInfoincludedIn()voidindex()default ChangeInfoinfo()get(ListChangesOption...)with no options included.ChangeMessageApimessage(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.default ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId)default ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId, ListChangesOption... options)default ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId, Collection<ListChangesOption> options)ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId, EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions)Gets the diff between a change's metadata with the two given refs.voidmove(MoveInput in)default voidmove(String destination)PureRevertInfopureRevert()Check if this change is a pure revert of the change stored in revertOf.PureRevertInfopureRevert(String claimedOriginal)Check if this change is a pure revert of claimedOriginal (SHA1 in 40 digit hex).default voidrebase()Rebase the current revision of a change using default options.voidrebase(RebaseInput in)Rebase the current revision of a change.default voidrestore()voidrestore(RestoreInput in)default ChangeApirevert()Create a new change that reverts this change.ChangeApirevert(RevertInput in)Create a new change that reverts this change.default RevertSubmissionInforevertSubmission()RevertSubmissionInforevertSubmission(RevertInput in)ReviewerApireviewer(String id)Look up the reviewer of the change.List<ReviewerInfo>reviewers()Retrieve reviewers (ReviewerState.REVIEWERandReviewerState.CC) on the change.default RevisionApirevision(int id)Look up a revision of a change by number.RevisionApirevision(String id)Look up a revision of a change by commit SHA-1 or other supported revision string.Map<String,List<RobotCommentInfo>>robotComments()Get all robot comments on a change.AccountInfosetAssignee(AssigneeInput input)Set the assignee of a change.voidsetHashtags(HashtagsInput input)Set hashtags on a changevoidsetMessage(CommitMessageInput in)Create a new patch set with a new commit message.default voidsetMessage(String message)Create a new patch set with a new commit message.default voidsetPrivate(boolean value)voidsetPrivate(boolean value, String message)default voidsetReadyForReview()voidsetReadyForReview(String message)default voidsetWorkInProgress()voidsetWorkInProgress(String message)default List<ChangeInfo>submittedTogether()default SubmittedTogetherInfosubmittedTogether(EnumSet<SubmittedTogetherOption> options)SubmittedTogetherInfosubmittedTogether(EnumSet<ListChangesOption> listOptions, EnumSet<SubmittedTogetherOption> submitOptions)default ChangeApi.SuggestedReviewersRequestsuggestCcs(String query)ChangeApi.SuggestedReviewersRequestsuggestReviewers()default ChangeApi.SuggestedReviewersRequestsuggestReviewers(String query)Stringtopic()voidtopic(String topic)
 
- 
- 
- 
Method Detail- 
idString id() 
 - 
currentdefault RevisionApi current() throws RestApiException Look up the current revision for the change.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 RevisionApiinstances.- Returns:
- API for accessing the revision.
- Throws:
- RestApiException- if an error occurred.
 
 - 
revisiondefault RevisionApi revision(int id) throws RestApiException Look up a revision of a change by number.- Throws:
- RestApiException
- See Also:
- current()
 
 - 
revisionRevisionApi revision(String id) throws RestApiException Look up a revision of a change by commit SHA-1 or other supported revision string.- Throws:
- RestApiException
- See Also:
- current()
 
 - 
reviewerReviewerApi reviewer(String id) throws RestApiException Look up the reviewer of the change.- Parameters:
- 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.
- Returns:
- API for accessing the reviewer.
- Throws:
- RestApiException- if id is not account ID or is a user that isn't known to be a reviewer for this change.
 
 - 
abandondefault void abandon() throws RestApiException- Throws:
- RestApiException
 
 - 
abandonvoid abandon(AbandonInput in) throws RestApiException - Throws:
- RestApiException
 
 - 
restoredefault void restore() throws RestApiException- Throws:
- RestApiException
 
 - 
restorevoid restore(RestoreInput in) throws RestApiException - Throws:
- RestApiException
 
 - 
movedefault void move(String destination) throws RestApiException - Throws:
- RestApiException
 
 - 
movevoid move(MoveInput in) throws RestApiException - Throws:
- RestApiException
 
 - 
setPrivatevoid setPrivate(boolean value, String message) throws RestApiException- Throws:
- RestApiException
 
 - 
setPrivatedefault void setPrivate(boolean value) throws RestApiException- Throws:
- RestApiException
 
 - 
setWorkInProgressvoid setWorkInProgress(String message) throws RestApiException - Throws:
- RestApiException
 
 - 
setReadyForReviewvoid setReadyForReview(String message) throws RestApiException - Throws:
- RestApiException
 
 - 
setWorkInProgressdefault void setWorkInProgress() throws RestApiException- Throws:
- RestApiException
 
 - 
setReadyForReviewdefault void setReadyForReview() throws RestApiException- Throws:
- RestApiException
 
 - 
ignorevoid ignore(boolean ignore) throws RestApiExceptionIgnore or un-ignore this change.- Parameters:
- ignore- ignore the change if true
- Throws:
- RestApiException
 
 - 
ignoredboolean ignored() throws RestApiExceptionCheck if this change is ignored.- Returns:
- true if the change is ignored
- Throws:
- RestApiException
 
 - 
revertdefault ChangeApi revert() throws RestApiException Create a new change that reverts this change.- Throws:
- RestApiException
- See Also:
- Changes.id(int)
 
 - 
revertChangeApi revert(RevertInput in) throws RestApiException Create a new change that reverts this change.- Throws:
- RestApiException
- See Also:
- Changes.id(int)
 
 - 
revertSubmissiondefault RevertSubmissionInfo revertSubmission() throws RestApiException - Throws:
- RestApiException
 
 - 
revertSubmissionRevertSubmissionInfo revertSubmission(RevertInput in) throws RestApiException - Throws:
- RestApiException
 
 - 
createMergePatchSetChangeInfo createMergePatchSet(MergePatchSetInput in) throws RestApiException Create a merge patch set for the change.- Throws:
- RestApiException
 
 - 
submittedTogetherdefault List<ChangeInfo> submittedTogether() throws RestApiException - Throws:
- RestApiException
 
 - 
submittedTogetherdefault SubmittedTogetherInfo submittedTogether(EnumSet<SubmittedTogetherOption> options) throws RestApiException - Throws:
- RestApiException
 
 - 
submittedTogetherSubmittedTogetherInfo submittedTogether(EnumSet<ListChangesOption> listOptions, EnumSet<SubmittedTogetherOption> submitOptions) throws RestApiException - Throws:
- RestApiException
 
 - 
rebasedefault void rebase() throws RestApiExceptionRebase the current revision of a change using default options.- Throws:
- RestApiException
 
 - 
rebasevoid rebase(RebaseInput in) throws RestApiException Rebase the current revision of a change.- Throws:
- RestApiException
 
 - 
deletevoid delete() throws RestApiExceptionDeletes a change.- Throws:
- RestApiException
 
 - 
topicString topic() throws RestApiException - Throws:
- RestApiException
 
 - 
topicvoid topic(String topic) throws RestApiException - Throws:
- RestApiException
 
 - 
includedInIncludedInInfo includedIn() throws RestApiException - Throws:
- RestApiException
 
 - 
addReviewerdefault ReviewerResult addReviewer(String reviewer) throws RestApiException - Throws:
- RestApiException
 
 - 
addReviewerReviewerResult addReviewer(ReviewerInput in) throws RestApiException - Throws:
- RestApiException
 
 - 
suggestReviewersChangeApi.SuggestedReviewersRequest suggestReviewers() throws RestApiException - Throws:
- RestApiException
 
 - 
suggestReviewersdefault ChangeApi.SuggestedReviewersRequest suggestReviewers(String query) throws RestApiException - Throws:
- RestApiException
 
 - 
suggestCcsdefault ChangeApi.SuggestedReviewersRequest suggestCcs(String query) throws RestApiException - Throws:
- RestApiException
 
 - 
reviewersList<ReviewerInfo> reviewers() throws RestApiException Retrieve reviewers (ReviewerState.REVIEWERandReviewerState.CC) on the change.- Throws:
- RestApiException
 
 - 
getChangeInfo get(EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions) throws RestApiException - Throws:
- RestApiException
 
 - 
getdefault ChangeInfo get(com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions) throws RestApiException - Throws:
- RestApiException
 
 - 
getdefault ChangeInfo get(EnumSet<ListChangesOption> options) throws RestApiException - Throws:
- RestApiException
 
 - 
getdefault ChangeInfo get(Iterable<ListChangesOption> options) throws RestApiException - Throws:
- RestApiException
 
 - 
getdefault ChangeInfo get(ListChangesOption... options) throws RestApiException - Throws:
- RestApiException
 
 - 
getdefault ChangeInfo get() throws RestApiException get(ListChangesOption...)with all options included, except for the following.- CHECKis omitted, to skip consistency checks.
- SKIP_DIFFSTATis omitted to ensure diffstat calculations.
 - Throws:
- RestApiException
 
 - 
metaDiffdefault ChangeInfoDifference metaDiff(String oldMetaRevId, String newMetaRevId) throws RestApiException - Throws:
- RestApiException
 
 - 
metaDiffdefault ChangeInfoDifference metaDiff(String oldMetaRevId, String newMetaRevId, ListChangesOption... options) throws RestApiException - Throws:
- RestApiException
 
 - 
metaDiffdefault ChangeInfoDifference metaDiff(String oldMetaRevId, String newMetaRevId, Collection<ListChangesOption> options) throws RestApiException - Throws:
- RestApiException
 
 - 
metaDiffChangeInfoDifference metaDiff(String oldMetaRevId, String newMetaRevId, EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<String,String> pluginOptions) throws RestApiException Gets the diff between a change's metadata with the two given refs.- Parameters:
- oldMetaRevId- the SHA-1 of the 'before' metadata diffed against- newMetaRevId
- newMetaRevId- the SHA-1 of the 'after' metadata diffed against- oldMetaRevId
- Throws:
- RestApiException
 
 - 
infodefault ChangeInfo info() throws RestApiException get(ListChangesOption...)with no options included.- Throws:
- RestApiException
 
 - 
editChangeEditApi edit() throws RestApiException Provides access to an API regarding the change edit of this change.- Returns:
- a ChangeEditApifor the change edit of this change
- Throws:
- RestApiException- if the API isn't accessible
 
 - 
setMessagedefault void setMessage(String message) throws RestApiException Create a new patch set with a new commit message.- Throws:
- RestApiException
 
 - 
setMessagevoid setMessage(CommitMessageInput in) throws RestApiException Create a new patch set with a new commit message.- Throws:
- RestApiException
 
 - 
setHashtagsvoid setHashtags(HashtagsInput input) throws RestApiException Set hashtags on a change- Throws:
- RestApiException
 
 - 
getHashtagsSet<String> getHashtags() throws RestApiException Get hashtags on a change.- Returns:
- hashtags
- Throws:
- RestApiException
 
 - 
attentionAttentionSetApi attention(String id) throws RestApiException Manage the attention set.- Parameters:
- id- The account identifier.
- Throws:
- RestApiException
 
 - 
addToAttentionSetAccountInfo addToAttentionSet(AttentionSetInput input) throws RestApiException Adds a user to the attention set.- Throws:
- RestApiException
 
 - 
setAssigneeAccountInfo setAssignee(AssigneeInput input) throws RestApiException Set the assignee of a change.- Throws:
- RestApiException
 
 - 
getAssigneeAccountInfo getAssignee() throws RestApiException Get the assignee of a change.- Throws:
- RestApiException
 
 - 
getPastAssigneesList<AccountInfo> getPastAssignees() throws RestApiException Get all past assignees.- Throws:
- RestApiException
 
 - 
deleteAssigneeAccountInfo deleteAssignee() throws RestApiException Delete the assignee of a change.- Returns:
- the assignee that was deleted, or null if there was no assignee.
- Throws:
- RestApiException
 
 - 
comments@Deprecated default Map<String,List<CommentInfo>> comments() throws RestApiException Deprecated.Callers should usecommentsRequest()insteadGet all published comments on a change.- Returns:
- comments in a map keyed by path; comments have the revisionfield set to indicate their patch set.
- Throws:
- RestApiException
 
 - 
commentsAsList@Deprecated default List<CommentInfo> commentsAsList() throws RestApiException Deprecated.Callers should usecommentsRequest()insteadGet all published comments on a change as a list.- Returns:
- comments as a list; comments have the revisionfield set to indicate their patch set.
- Throws:
- RestApiException
 
 - 
commentsRequestChangeApi.CommentsRequest commentsRequest() throws RestApiException Get aChangeApi.CommentsRequestentity that can be used to retrieve published comments.- Returns:
- A ChangeApi.CommentsRequestentity that can be used to retrieve the comments using theChangeApi.CommentsRequest.get()orChangeApi.CommentsRequest.getAsList().
- Throws:
- RestApiException
 
 - 
robotCommentsMap<String,List<RobotCommentInfo>> robotComments() throws RestApiException Get all robot comments on a change.- Returns:
- robot comments in a map keyed by path; robot comments have the revisionfield set to indicate their patch set.
- Throws:
- RestApiException
 
 - 
draftsdefault Map<String,List<CommentInfo>> drafts() throws RestApiException Get all draft comments for the current user on a change.- Returns:
- drafts in a map keyed by path; comments have the revisionfield set to indicate their patch set.
- Throws:
- RestApiException
 
 - 
draftsAsListdefault List<CommentInfo> draftsAsList() throws RestApiException Get all draft comments for the current user on a change as a list.- Returns:
- drafts as a list; comments have the revisionfield set to indicate their patch set.
- Throws:
- RestApiException
 
 - 
draftsRequestChangeApi.DraftsRequest draftsRequest() throws RestApiException Get aChangeApi.DraftsRequestentity that can be used to retrieve draft comments.- Returns:
- A ChangeApi.DraftsRequestentity that can be used to retrieve the draft comments usingChangeApi.CommentsRequest.get()orChangeApi.CommentsRequest.getAsList().
- Throws:
- RestApiException
 
 - 
checkChangeInfo check() throws RestApiException - Throws:
- RestApiException
 
 - 
checkChangeInfo check(FixInput fix) throws RestApiException - Throws:
- RestApiException
 
 - 
checkSubmitRequirementSubmitRequirementResultInfo checkSubmitRequirement(SubmitRequirementInput input) throws RestApiException Returns the result of evaluating theSubmitRequirementInputinput on the change.- Throws:
- RestApiException
 
 - 
indexvoid index() throws RestApiException- Throws:
- RestApiException
 
 - 
pureRevertPureRevertInfo pureRevert() throws RestApiException Check if this change is a pure revert of the change stored in revertOf.- Throws:
- RestApiException
 
 - 
pureRevertPureRevertInfo pureRevert(String claimedOriginal) throws RestApiException Check if this change is a pure revert of claimedOriginal (SHA1 in 40 digit hex).- Throws:
- RestApiException
 
 - 
messagesList<ChangeMessageInfo> messages() throws RestApiException Get all messages of a change with detailed account info.- Returns:
- a list of messages sorted by their creation time.
- Throws:
- RestApiException
 
 - 
messageChangeMessageApi message(String id) throws RestApiException Look up a change message of a change by its id.- Parameters:
- id- the id of the change message. In NoteDb, this id is the- ObjectIdof a commit on the change meta branch.
- Returns:
- API for accessing a change message.
- Throws:
- RestApiException- if the id is invalid.
 
 
- 
 
-