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,
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 |
setAllowClosed(boolean allowClosed) |
PatchSetInserter |
setCheckAddPatchSetPermission(boolean checkAddPatchSetPermission) |
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 |
setSendEmail(boolean sendEmail) |
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, 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 setAllowClosed(boolean allowClosed)
public PatchSetInserter setSendEmail(boolean sendEmail)
public Change getChange()
public PatchSet getPatchSet()
public void updateRepo(RepoContext ctx) throws AuthException, ResourceConflictException, java.io.IOException, PermissionBackendException
RepoOnlyOp
updateRepo
in interface RepoOnlyOp
ctx
- contextAuthException
ResourceConflictException
java.io.IOException
PermissionBackendException
public boolean updateChange(ChangeContext ctx) throws ResourceConflictException, java.io.IOException
BatchUpdateOp
updateChange
in interface BatchUpdateOp
ctx
- contextResourceConflictException
java.io.IOException
public void postUpdate(Context ctx)
RepoOnlyOp
postUpdate
in interface RepoOnlyOp
ctx
- context