Package com.google.gerrit.server.change
Class Abandon
- java.lang.Object
-
- com.google.gerrit.server.update.RetryingRestModifyView<ChangeResource,AbandonInput,ChangeInfo>
-
- com.google.gerrit.server.change.Abandon
-
- All Implemented Interfaces:
RestModifyView<ChangeResource,AbandonInput>
,RestView<ChangeResource>
,UiAction<ChangeResource>
public class Abandon extends RetryingRestModifyView<ChangeResource,AbandonInput,ChangeInfo> implements UiAction<ChangeResource>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gerrit.extensions.webui.UiAction
UiAction.Description
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Change
abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user)
Change
abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user, String msgTxt)
Change
abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user, String msgTxt, NotifyHandling notifyHandling, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify)
protected ChangeInfo
applyImpl(BatchUpdate.Factory updateFactory, ChangeResource req, AbandonInput input)
void
batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes)
void
batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes, String msgTxt)
void
batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes, String msgTxt, NotifyHandling notifyHandling, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify)
If an extension has more than one changes to abandon that belong to the same project, they should use the batch instead of abandoning one by one.UiAction.Description
getDescription(ChangeResource rsrc)
Get the description of the action customized for the resource.-
Methods inherited from class com.google.gerrit.server.update.RetryingRestModifyView
apply
-
-
-
-
Method Detail
-
applyImpl
protected ChangeInfo applyImpl(BatchUpdate.Factory updateFactory, ChangeResource req, AbandonInput input) throws RestApiException, UpdateException, com.google.gwtorm.server.OrmException, PermissionBackendException, IOException, org.eclipse.jgit.errors.ConfigInvalidException
- Specified by:
applyImpl
in classRetryingRestModifyView<ChangeResource,AbandonInput,ChangeInfo>
- Throws:
RestApiException
UpdateException
com.google.gwtorm.server.OrmException
PermissionBackendException
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
abandon
public Change abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
abandon
public Change abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user, String msgTxt) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
abandon
public Change abandon(BatchUpdate.Factory updateFactory, ChangeNotes notes, CurrentUser user, String msgTxt, NotifyHandling notifyHandling, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
batchAbandon
public void batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes, String msgTxt, NotifyHandling notifyHandling, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify) throws RestApiException, UpdateException
If an extension has more than one changes to abandon that belong to the same project, they should use the batch instead of abandoning one by one.It's the caller's responsibility to ensure that all jobs inside the same batch have the matching project from its ChangeData. Violations will result in a ResourceConflictException.
- Throws:
RestApiException
UpdateException
-
batchAbandon
public void batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes, String msgTxt) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
batchAbandon
public void batchAbandon(BatchUpdate.Factory updateFactory, Project.NameKey project, CurrentUser user, Collection<ChangeData> changes) throws RestApiException, UpdateException
- Throws:
RestApiException
UpdateException
-
getDescription
public UiAction.Description getDescription(ChangeResource rsrc)
Description copied from interface:UiAction
Get the description of the action customized for the resource.- Specified by:
getDescription
in interfaceUiAction<ChangeResource>
- Parameters:
rsrc
- the resource the view would act upon if the action is invoked by the client. Information from the resource can be used to customize the description.- Returns:
- a description of the action. The server will populate the
id
andmethod
properties. If null the action will assumed unavailable and not presented. This is usually the same assetVisible(false)
.
-
-