Package com.google.gerrit.server.edit
Interface ModificationTarget
-
- All Known Implementing Classes:
ModificationTarget.EditCommit,ModificationTarget.PatchsetCommit
public interface ModificationTargetTarget of the modification of a commit.This is currently used in the context of change edits which involves both direct actions on change edits (e.g. creating a change edit; modifying a file of a change edit) as well as indirect creation/modification of them (e.g. via applying a suggested fix of a robot comment.)
Depending on the situation and exact action, either an existing
ChangeEdit(->ModificationTarget.EditCommitor a specific patchset commit (->ModificationTarget.PatchsetCommit) is the target of a modification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classModificationTarget.EditCommitAn existingChangeEditcommit is the target of the modification.static classModificationTarget.PatchsetCommitA specific patchset commit is the target of the modification.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidensureNewEditMayBeBasedOnTarget(Change change)voidensureTargetMayBeModifiedDespiteExistingEdit(ChangeEdit changeEdit)PatchSetgetBasePatchset()Patchset within whose context the modification happens.org.eclipse.jgit.revwalk.RevCommitgetCommit(org.eclipse.jgit.lib.Repository repository)Commit to modify.
-
-
-
Method Detail
-
ensureNewEditMayBeBasedOnTarget
void ensureNewEditMayBeBasedOnTarget(Change change) throws InvalidChangeOperationException
- Throws:
InvalidChangeOperationException
-
ensureTargetMayBeModifiedDespiteExistingEdit
void ensureTargetMayBeModifiedDespiteExistingEdit(ChangeEdit changeEdit) throws InvalidChangeOperationException
- Throws:
InvalidChangeOperationException
-
getCommit
org.eclipse.jgit.revwalk.RevCommit getCommit(org.eclipse.jgit.lib.Repository repository) throws IOExceptionCommit to modify.- Throws:
IOException
-
getBasePatchset
PatchSet getBasePatchset()
Patchset within whose context the modification happens. This also applies to change edits as each change edit is based on a specific patchset.
-
-