public class PatchSetInserter extends BatchUpdate.Op
Modifier and Type | Class and Description |
---|---|
static interface |
PatchSetInserter.Factory |
Constructor and Description |
---|
PatchSetInserter(ApprovalsUtil approvalsUtil,
ApprovalCopier approvalCopier,
ChangeMessagesUtil cmUtil,
PatchSetInfoFactory patchSetInfoFactory,
CommitValidators.Factory commitValidatorsFactory,
ReplacePatchSetSender.Factory replacePatchSetFactory,
PatchSetUtil psUtil,
RevisionCreated revisionCreated,
ChangeControl ctl,
com.google.gerrit.reviewdb.client.PatchSet.Id psId,
org.eclipse.jgit.revwalk.RevCommit commit) |
Modifier and Type | Method and Description |
---|---|
com.google.gerrit.reviewdb.client.Change |
getChange() |
com.google.gerrit.reviewdb.client.PatchSet |
getPatchSet() |
com.google.gerrit.reviewdb.client.PatchSet.Id |
getPatchSetId() |
void |
postUpdate(BatchUpdate.Context ctx)
Override this method to do something after the update
e.g.
|
PatchSetInserter |
setAllowClosed(boolean allowClosed) |
PatchSetInserter |
setCopyApprovals(boolean copyApprovals) |
PatchSetInserter |
setDraft(boolean draft) |
PatchSetInserter |
setFireRevisionCreated(boolean fireRevisionCreated) |
PatchSetInserter |
setGroups(List<String> groups) |
PatchSetInserter |
setMessage(String message) |
PatchSetInserter |
setSendMail(boolean sendMail) |
PatchSetInserter |
setSshInfo(SshInfo sshInfo) |
PatchSetInserter |
setValidatePolicy(CommitValidators.Policy validate) |
boolean |
updateChange(BatchUpdate.ChangeContext ctx)
Override this method to modify a change.
|
void |
updateRepo(BatchUpdate.RepoContext ctx)
Override this method to update the repo.
|
public PatchSetInserter(ApprovalsUtil approvalsUtil, ApprovalCopier approvalCopier, ChangeMessagesUtil cmUtil, PatchSetInfoFactory patchSetInfoFactory, CommitValidators.Factory commitValidatorsFactory, ReplacePatchSetSender.Factory replacePatchSetFactory, PatchSetUtil psUtil, RevisionCreated revisionCreated, ChangeControl ctl, com.google.gerrit.reviewdb.client.PatchSet.Id psId, org.eclipse.jgit.revwalk.RevCommit commit)
public com.google.gerrit.reviewdb.client.PatchSet.Id getPatchSetId()
public PatchSetInserter setMessage(String message)
public PatchSetInserter setSshInfo(SshInfo sshInfo)
public PatchSetInserter setValidatePolicy(CommitValidators.Policy validate)
public PatchSetInserter setDraft(boolean draft)
public PatchSetInserter setGroups(List<String> groups)
public PatchSetInserter setFireRevisionCreated(boolean fireRevisionCreated)
public PatchSetInserter setSendMail(boolean sendMail)
public PatchSetInserter setAllowClosed(boolean allowClosed)
public PatchSetInserter setCopyApprovals(boolean copyApprovals)
public com.google.gerrit.reviewdb.client.Change getChange()
public com.google.gerrit.reviewdb.client.PatchSet getPatchSet()
public void updateRepo(BatchUpdate.RepoContext ctx) throws com.google.gerrit.extensions.restapi.AuthException, com.google.gerrit.extensions.restapi.ResourceConflictException, IOException, com.google.gwtorm.server.OrmException
BatchUpdate.RepoOnlyOp
updateRepo
in class BatchUpdate.RepoOnlyOp
ctx
- contextcom.google.gerrit.extensions.restapi.AuthException
com.google.gerrit.extensions.restapi.ResourceConflictException
IOException
com.google.gwtorm.server.OrmException
public boolean updateChange(BatchUpdate.ChangeContext ctx) throws com.google.gerrit.extensions.restapi.ResourceConflictException, com.google.gwtorm.server.OrmException, IOException
BatchUpdate.Op
updateChange
in class BatchUpdate.Op
ctx
- contextcom.google.gerrit.extensions.restapi.ResourceConflictException
com.google.gwtorm.server.OrmException
IOException
public void postUpdate(BatchUpdate.Context ctx) throws com.google.gwtorm.server.OrmException
BatchUpdate.RepoOnlyOp
postUpdate
in class BatchUpdate.RepoOnlyOp
ctx
- contextcom.google.gwtorm.server.OrmException