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 ClassesModifier and TypeInterfaceDescriptionstatic class
An existingChangeEdit
commit is the target of the modification.static class
A specific patchset commit is the target of the modification. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Patchset within whose context the modification happens.org.eclipse.jgit.revwalk.RevCommit
getCommit
(org.eclipse.jgit.lib.Repository repository) Commit to modify.
-
Method Details
-
ensureNewEditMayBeBasedOnTarget
- 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.
-