public class ChangeEditUtil
extends java.lang.Object
This class contains methods to retrieve, publish and delete edits. For changing edits see
ChangeEditModifier
.
Modifier and Type | Method and Description |
---|---|
java.util.Optional<ChangeEdit> |
byChange(Change change)
Retrieve edit for a change and the user from the request scope.
|
java.util.Optional<ChangeEdit> |
byChange(ChangeControl ctl)
Retrieve edit for a change and the given user.
|
void |
delete(ChangeEdit edit)
Delete change edit.
|
void |
publish(ChangeEdit edit,
NotifyHandling notify,
com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify)
Promote change edit to patch set, by squashing the edit into its parent.
|
public java.util.Optional<ChangeEdit> byChange(Change change) throws AuthException, java.io.IOException, com.google.gwtorm.server.OrmException
At most one change edit can exist per user and change.
change
- AuthException
java.io.IOException
com.google.gwtorm.server.OrmException
public java.util.Optional<ChangeEdit> byChange(ChangeControl ctl) throws AuthException, java.io.IOException
At most one change edit can exist per user and change.
ctl
- control with user to retrieve change edits for.AuthException
- if this is not a logged-in user.java.io.IOException
- if an error occurs.public void publish(ChangeEdit edit, NotifyHandling notify, com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify) throws java.io.IOException, com.google.gwtorm.server.OrmException, RestApiException, UpdateException
edit
- change edit to publishnotify
- Notify handling that defines to whom email notifications should be sent after the
change edit is published.accountsToNotify
- Accounts that should be notified after the change edit is published.java.io.IOException
com.google.gwtorm.server.OrmException
UpdateException
RestApiException
public void delete(ChangeEdit edit) throws java.io.IOException, com.google.gwtorm.server.OrmException
edit
- change edit to deletejava.io.IOException
com.google.gwtorm.server.OrmException