DS-3406: Ordering sub communities and collections

This commit is contained in:
Yana De Pauw
2017-01-12 12:54:47 +01:00
committed by Tim Donohue
parent 821678dae4
commit a588d42f5a
6 changed files with 55 additions and 38 deletions

View File

@@ -455,7 +455,7 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
rawDelete(context, childCommunity);
childCommunity.getParentCommunities().remove(parentCommunity);
childCommunity.removeParentCommunity(parentCommunity);
parentCommunity.removeSubCommunity(childCommunity);
log.info(LogManager.getHeader(context, "remove_subcommunity",
@@ -492,7 +492,7 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
Iterator<Community> subcommunities = community.getSubcommunities().iterator();
while (subcommunities.hasNext()) {
Community subCommunity = subcommunities.next();
subcommunities.remove();
community.removeSubCommunity(subCommunity);
delete(context, subCommunity);
}
// now let the parent remove the community
@@ -535,7 +535,7 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
while (collections.hasNext())
{
Collection collection = collections.next();
collections.remove();
community.removeCollection(collection);
removeCollection(context, community, collection);
}
// delete subcommunities
@@ -544,7 +544,7 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
while (subCommunities.hasNext())
{
Community subComm = subCommunities.next();
subCommunities.remove();
community.removeSubCommunity(subComm);
delete(context, subComm);
}