public class PatchSetInserter extends java.lang.Object implements BatchUpdateOp
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,
PatchSet.Id psId,
org.eclipse.jgit.revwalk.RevCommit commit) |
Modifier and Type | Method and Description |
---|---|
Change |
getChange() |
PatchSet |
getPatchSet() |
PatchSet.Id |
getPatchSetId() |
void |
postUpdate(Context ctx)
Override this method to do something after the update e.g.
|
PatchSetInserter |
setAccountsToNotify(com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify) |
PatchSetInserter |
setAllowClosed(boolean allowClosed) |
PatchSetInserter |
setCheckAddPatchSetPermission(boolean checkAddPatchSetPermission) |
PatchSetInserter |
setCopyApprovals(boolean copyApprovals) |
PatchSetInserter |
setDescription(java.lang.String description) |
PatchSetInserter |
setDraft(boolean draft) |
PatchSetInserter |
setFireRevisionCreated(boolean fireRevisionCreated) |
PatchSetInserter |
setGroups(java.util.List<java.lang.String> groups) |
PatchSetInserter |
setMessage(java.lang.String message) |
PatchSetInserter |
setNotify(NotifyHandling notify) |
PatchSetInserter |
setValidatePolicy(CommitValidators.Policy validate) |
boolean |
updateChange(ChangeContext ctx)
Override this method to modify a change.
|
void |
updateRepo(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, PatchSet.Id psId, org.eclipse.jgit.revwalk.RevCommit commit)
public PatchSet.Id getPatchSetId()
public PatchSetInserter setMessage(java.lang.String message)
public PatchSetInserter setDescription(java.lang.String description)
public PatchSetInserter setValidatePolicy(CommitValidators.Policy validate)
public PatchSetInserter setCheckAddPatchSetPermission(boolean checkAddPatchSetPermission)
public PatchSetInserter setDraft(boolean draft)
public PatchSetInserter setGroups(java.util.List<java.lang.String> groups)
public PatchSetInserter setFireRevisionCreated(boolean fireRevisionCreated)
public PatchSetInserter setNotify(NotifyHandling notify)
public PatchSetInserter setAccountsToNotify(com.google.common.collect.ListMultimap<RecipientType,Account.Id> accountsToNotify)
public PatchSetInserter setAllowClosed(boolean allowClosed)
public PatchSetInserter setCopyApprovals(boolean copyApprovals)
public Change getChange()
public PatchSet getPatchSet()
public void updateRepo(RepoContext ctx) throws AuthException, ResourceConflictException, java.io.IOException, com.google.gwtorm.server.OrmException
RepoOnlyOp
updateRepo
in interface RepoOnlyOp
ctx
- contextAuthException
ResourceConflictException
java.io.IOException
com.google.gwtorm.server.OrmException
public boolean updateChange(ChangeContext ctx) throws ResourceConflictException, com.google.gwtorm.server.OrmException, java.io.IOException
BatchUpdateOp
updateChange
in interface BatchUpdateOp
ctx
- contextResourceConflictException
com.google.gwtorm.server.OrmException
java.io.IOException
public void postUpdate(Context ctx) throws com.google.gwtorm.server.OrmException
RepoOnlyOp
postUpdate
in interface RepoOnlyOp
ctx
- contextcom.google.gwtorm.server.OrmException