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 |
---|---|
com.google.common.base.Optional<ChangeEdit> |
byChange(com.google.gerrit.reviewdb.client.Change change)
Retrieve edits for a change and user.
|
com.google.common.base.Optional<ChangeEdit> |
byChange(com.google.gerrit.reviewdb.client.Change change,
IdentifiedUser user)
Retrieve edits for a change and user.
|
void |
delete(ChangeEdit edit)
Delete change edit.
|
void |
publish(ChangeEdit edit)
Promote change edit to patch set, by squashing the edit into
its parent.
|
public com.google.common.base.Optional<ChangeEdit> byChange(com.google.gerrit.reviewdb.client.Change change) throws com.google.gerrit.extensions.restapi.AuthException, java.io.IOException
change
- com.google.gerrit.extensions.restapi.AuthException
java.io.IOException
public com.google.common.base.Optional<ChangeEdit> byChange(com.google.gerrit.reviewdb.client.Change change, IdentifiedUser user) throws java.io.IOException
change
- user
- to retrieve change edits forjava.io.IOException
public void publish(ChangeEdit edit) throws NoSuchChangeException, java.io.IOException, com.google.gwtorm.server.OrmException, com.google.gerrit.extensions.restapi.ResourceConflictException
edit
- change edit to publishNoSuchChangeException
java.io.IOException
com.google.gwtorm.server.OrmException
com.google.gerrit.extensions.restapi.ResourceConflictException
public void delete(ChangeEdit edit) throws java.io.IOException
edit
- change edit to deletejava.io.IOException