Interface ChangeApi
- All Known Implementing Classes:
- ChangeApi.NotImplemented
public interface ChangeApi
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classA default implementation which allows source compatibility when adding new methods to the interface.static class
- 
Method SummaryModifier and TypeMethodDescriptiondefault voidabandon()voidabandon(AbandonInput in) default ReviewerResultaddReviewer(String reviewer) Adds a user to the attention set.Manage the attention set.check()Returns the result of evaluating theSubmitRequirementInputinput on the change.default Map<String,List<CommentInfo>> comments()Deprecated.default List<CommentInfo>Deprecated.Callers should usecommentsRequest()insteadGet aChangeApi.CommentsRequestentity that can be used to retrieve published comments.Create a merge patch set for the change.default RevisionApicurrent()Look up the current revision for the change.voiddelete()Deletes a change.default Map<String,List<CommentInfo>> drafts()Get all draft comments for the current user on a change.default List<CommentInfo>Get all draft comments for the current user on a change as a list.Get aChangeApi.DraftsRequestentity that can be used to retrieve draft comments.edit()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 ChangeInfodefault ChangeInfoget(ListChangesOption... options) default ChangeInfoget(Iterable<ListChangesOption> options) default ChangeInfoget(EnumSet<ListChangesOption> options) get(EnumSet<ListChangesOption> options, com.google.common.collect.ImmutableListMultimap<String, String> pluginOptions) Gets the custom keyed values on a change.Get hashtags on a change.id()voidindex()default ChangeInfoinfo()get(ListChangesOption...)with no options included.Look up a change message of a change by its id.messages()Get all messages of a change with detailed account info.default ChangeInfoDifferencedefault ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId, ListChangesOption... options) default ChangeInfoDifferencemetaDiff(String oldMetaRevId, String newMetaRevId, Collection<ListChangesOption> options) metaDiff(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.voiddefault voidCheck if this change is a pure revert of the change stored in revertOf.pureRevert(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 Response<RebaseChainInfo>Rebase the current revisions of a change's chain using default options.Rebase the current revisions of a change's chain.default voidrestore()voidrestore(RestoreInput in) default ChangeApirevert()Create a new change that reverts this change.revert(RevertInput in) Create a new change that reverts this change.default RevertSubmissionInfoLook up the reviewer of the change.Retrieve reviewers (ReviewerState.REVIEWERandReviewerState.CC) on the change.default RevisionApirevision(int id) Look up a revision of a change by number.Look up a revision of a change by commit SHA-1 or other supported revision string.Get all robot comments on a change.voidSet custom keyed values on a changevoidsetHashtags(HashtagsInput input) Set hashtags on a changevoidCreate 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 voidvoidsetReadyForReview(String message) default voidvoidsetWorkInProgress(String message) default List<ChangeInfo>default SubmittedTogetherInfosubmittedTogether(EnumSet<SubmittedTogetherOption> options) submittedTogether(EnumSet<ListChangesOption> listOptions, EnumSet<SubmittedTogetherOption> submitOptions) suggestCcs(String query) suggestReviewers(String query) topic()void
- 
Method Details- 
idString id()
- 
currentLook 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.
 
- 
revisionLook up a revision of a change by number.- Throws:
- RestApiException
- See Also:
 
- 
revisionLook up a revision of a change by commit SHA-1 or other supported revision string.- Throws:
- RestApiException
- See Also:
 
- 
reviewerLook 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.
 
- 
abandon- Throws:
- RestApiException
 
- 
abandon- Throws:
- RestApiException
 
- 
restore- Throws:
- RestApiException
 
- 
restore- Throws:
- RestApiException
 
- 
move- Throws:
- RestApiException
 
- 
move- Throws:
- RestApiException
 
- 
setPrivate- Throws:
- RestApiException
 
- 
setPrivate- Throws:
- RestApiException
 
- 
setWorkInProgress- Throws:
- RestApiException
 
- 
setReadyForReview- Throws:
- RestApiException
 
- 
setWorkInProgress- Throws:
- RestApiException
 
- 
setReadyForReview- Throws:
- RestApiException
 
- 
revertCreate a new change that reverts this change.- Throws:
- RestApiException
 
- 
revertCreate a new change that reverts this change.- Throws:
- RestApiException
 
- 
revertSubmission- Throws:
- RestApiException
 
- 
revertSubmission- Throws:
- RestApiException
 
- 
createMergePatchSetCreate a merge patch set for the change.- Throws:
- RestApiException
 
- 
applyPatch- Throws:
- RestApiException
 
- 
submittedTogether- Throws:
- RestApiException
 
- 
submittedTogetherdefault SubmittedTogetherInfo submittedTogether(EnumSet<SubmittedTogetherOption> options) throws RestApiException - Throws:
- RestApiException
 
- 
submittedTogetherSubmittedTogetherInfo submittedTogether(EnumSet<ListChangesOption> listOptions, EnumSet<SubmittedTogetherOption> submitOptions) throws RestApiException - Throws:
- RestApiException
 
- 
rebaseRebase the current revision of a change using default options.- Throws:
- RestApiException
 
- 
rebaseRebase the current revision of a change.- Throws:
- RestApiException
 
- 
rebaseChainRebase the current revisions of a change's chain using default options.- Returns:
- a RebaseChainInfocontains theChangeInfodata for the rebased the chain
- Throws:
- RestApiException
 
- 
rebaseChainRebase the current revisions of a change's chain.- Returns:
- a RebaseChainInfocontains theChangeInfodata for the rebased the chain
- Throws:
- RestApiException
 
- 
deleteDeletes a change.- Throws:
- RestApiException
 
- 
topic- Throws:
- RestApiException
 
- 
topic- Throws:
- RestApiException
 
- 
includedIn- Throws:
- RestApiException
 
- 
addReviewer- Throws:
- RestApiException
 
- 
addReviewer- Throws:
- RestApiException
 
- 
suggestReviewers- Throws:
- RestApiException
 
- 
suggestReviewers- Throws:
- RestApiException
 
- 
suggestCcs- Throws:
- RestApiException
 
- 
reviewersRetrieve 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
 
- 
get- Throws:
- RestApiException
 
- 
get- Throws:
- RestApiException
 
- 
get- Throws:
- RestApiException
 
- 
getget(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 RestApiExceptionGets 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
 
- 
infoget(ListChangesOption...)with no options included.- Throws:
- RestApiException
 
- 
editProvides 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
 
- 
getMessage- Throws:
- RestApiException
 
- 
setMessageCreate a new patch set with a new commit message.- Throws:
- RestApiException
 
- 
setMessageCreate a new patch set with a new commit message.- Throws:
- RestApiException
 
- 
setHashtagsSet hashtags on a change- Throws:
- RestApiException
 
- 
getHashtagsGet hashtags on a change.- Returns:
- hashtags
- Throws:
- RestApiException
 
- 
setCustomKeyedValuesSet custom keyed values on a change- Throws:
- RestApiException
 
- 
getCustomKeyedValuescom.google.common.collect.ImmutableMap<String,String> getCustomKeyedValues() throws RestApiExceptionGets the custom keyed values on a change.- Returns:
- customKeyedValues
- Throws:
- RestApiException
 
- 
attentionManage the attention set.- Parameters:
- id- The account identifier.
- Throws:
- RestApiException
 
- 
addToAttentionSet@CanIgnoreReturnValue AccountInfo addToAttentionSet(AttentionSetInput input) throws RestApiException Adds a user to the attention set.- Throws:
- RestApiException
 
- 
commentsDeprecated.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
 
- 
commentsAsListDeprecated.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
 
- 
commentsRequestGet 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
 
- 
robotCommentsGet 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
 
- 
draftsGet 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
 
- 
draftsAsListGet 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
 
- 
draftsRequestGet 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
 
- 
check- Throws:
- RestApiException
 
- 
check- Throws:
- RestApiException
 
- 
checkSubmitRequirementRequest- Throws:
- RestApiException
 
- 
checkSubmitRequirementSubmitRequirementResultInfo checkSubmitRequirement(SubmitRequirementInput input) throws RestApiException Returns the result of evaluating theSubmitRequirementInputinput on the change.- Throws:
- RestApiException
 
- 
index- Throws:
- RestApiException
 
- 
pureRevertCheck if this change is a pure revert of the change stored in revertOf.- Throws:
- RestApiException
 
- 
pureRevertCheck if this change is a pure revert of claimedOriginal (SHA1 in 40 digit hex).- Throws:
- RestApiException
 
- 
messagesGet all messages of a change with detailed account info.- Returns:
- a list of messages sorted by their creation time.
- Throws:
- RestApiException
 
- 
messageLook 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.
 
 
- 
commentsRequest()instead