Package com.google.gerrit.server.change
Class GetRelatedChangesUtil
- java.lang.Object
-
- com.google.gerrit.server.change.GetRelatedChangesUtil
-
public class GetRelatedChangesUtil extends Object
Utility class that gets the ancestor changes and the descendent changes of a specific change.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Set<String>
getAllGroups(Collection<PatchSet> patchSets)
List<RelatedChangesSorter.PatchSetData>
getAncestors(ChangeData changeData, PatchSet basePs, boolean alwaysIncludeOriginalChange)
Gets ancestor changes of a specific change revision.List<RelatedChangesSorter.PatchSetData>
getRelated(ChangeData changeData, PatchSet basePs)
Gets related changes of a specific change revision.
-
-
-
Method Detail
-
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
public static Set<String> getAllGroups(Collection<PatchSet> patchSets)
-
-