public class PatchSetInserter extends java.lang.Object implements BatchUpdateOp
Modifier and Type | Class and Description |
---|---|
static interface |
PatchSetInserter.Factory |
Constructor and Description |
---|
PatchSetInserter(PermissionBackend permissionBackend,
ApprovalsUtil approvalsUtil,
ApprovalCopier approvalCopier,
ChangeMessagesUtil cmUtil,
PatchSetInfoFactory patchSetInfoFactory,
CommitValidators.Factory commitValidatorsFactory,
ReplacePatchSetSender.Factory replacePatchSetFactory,
PatchSetUtil psUtil,
RevisionCreated revisionCreated,
ProjectCache projectCache,
ChangeNotes notes,
PatchSet.Id psId,
org.eclipse.jgit.lib.ObjectId commitId) |
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 |
setFireRevisionCreated(boolean fireRevisionCreated) |
PatchSetInserter |
setGroups(java.util.List<java.lang.String> groups) |
PatchSetInserter |
setMessage(java.lang.String message) |
PatchSetInserter |
setNotify(NotifyHandling notify) |
PatchSetInserter |
setValidate(boolean validate) |
boolean |
updateChange(ChangeContext ctx)
Override this method to modify a change.
|
void |
updateRepo(RepoContext ctx)
Override this method to update the repo.
|
@Inject public PatchSetInserter(PermissionBackend permissionBackend, ApprovalsUtil approvalsUtil, ApprovalCopier approvalCopier, ChangeMessagesUtil cmUtil, PatchSetInfoFactory patchSetInfoFactory, CommitValidators.Factory commitValidatorsFactory, ReplacePatchSetSender.Factory replacePatchSetFactory, PatchSetUtil psUtil, RevisionCreated revisionCreated, ProjectCache projectCache, ChangeNotes notes, PatchSet.Id psId, org.eclipse.jgit.lib.ObjectId commitId)
public PatchSet.Id getPatchSetId()
public PatchSetInserter setMessage(java.lang.String message)
public PatchSetInserter setDescription(java.lang.String description)
public PatchSetInserter setValidate(boolean validate)
public PatchSetInserter setCheckAddPatchSetPermission(boolean checkAddPatchSetPermission)
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, PermissionBackendException
RepoOnlyOp
updateRepo
in interface RepoOnlyOp
ctx
- contextAuthException
ResourceConflictException
java.io.IOException
com.google.gwtorm.server.OrmException
PermissionBackendException
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