Package com.google.gerrit.server.edit
Interface ModificationTarget
-
- All Known Implementing Classes:
ModificationTarget.EditCommit
,ModificationTarget.PatchsetCommit
public interface ModificationTarget
Target 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.EditCommit
or a specific patchset commit (->ModificationTarget.PatchsetCommit
) is the target of a modification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ModificationTarget.EditCommit
An existingChangeEdit
commit is the target of the modification.static class
ModificationTarget.PatchsetCommit
A specific patchset commit is the target of the modification.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
ensureNewEditMayBeBasedOnTarget(Change change)
void
ensureTargetMayBeModifiedDespiteExistingEdit(ChangeEdit changeEdit)
PatchSet
getBasePatchset()
Patchset within whose context the modification happens.org.eclipse.jgit.revwalk.RevCommit
getCommit(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 IOException
Commit 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.
-
-