Package com.google.gerrit.server.change
Class GetRelatedChangesUtil
java.lang.Object
com.google.gerrit.server.change.GetRelatedChangesUtil
Utility class that gets the ancestor changes and the descendent changes of a specific change.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllGroups
(Collection<PatchSet> patchSets) getAncestors
(ChangeData changeData, PatchSet basePs, boolean alwaysIncludeOriginalChange) Gets ancestor changes of a specific change revision.getRelated
(ChangeData changeData, PatchSet basePs) Gets related changes of a specific change revision.
-
Method Details
-
getRelated
public List<RelatedChangesSorter.PatchSetData> getRelated(ChangeData changeData, PatchSet basePs) throws IOException, PermissionBackendException Gets related changes of a specific change revision.- Parameters:
changeData
- the change of the inputted revision.basePs
- the revision that the method checks for related changes.- Returns:
- list of related changes, sorted via
RelatedChangesSorter
- Throws:
IOException
PermissionBackendException
-
getAncestors
public List<RelatedChangesSorter.PatchSetData> getAncestors(ChangeData changeData, PatchSet basePs, boolean alwaysIncludeOriginalChange) throws IOException, PermissionBackendException Gets ancestor changes of a specific change revision.- Parameters:
changeData
- the change of the inputted revision.basePs
- the revision that the method checks for related changes.alwaysIncludeOriginalChange
- whether to return the given change when no ancestors found.- Returns:
- list of ancestor changes, sorted via
RelatedChangesSorter
- Throws:
IOException
PermissionBackendException
-
getAllGroups
-