mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 18:44:22 +00:00
Merge pull request #1319 from KevinVdV/DS-2996-fix-hiearchical-community-retrieval
[DS-2996] Fix retrieval of hierarchical of communities from a collection
This commit is contained in:
@@ -323,6 +323,17 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
||||
return parentList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Community> getAllParents(Context context, Collection collection) throws SQLException {
|
||||
List<Community> result = new ArrayList<>();
|
||||
List<Community> communities = collection.getCommunities();
|
||||
result.addAll(communities);
|
||||
for (Community community : communities) {
|
||||
result.addAll(getAllParents(context, community));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Collection> getAllCollections(Context context, Community community) throws SQLException {
|
||||
List<Collection> collectionList = new ArrayList<Collection>();
|
||||
|
Reference in New Issue
Block a user