mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-11 12:03:09 +00:00
[CSTPER-221] Collection handle generation after creation
This commit is contained in:
@@ -108,16 +108,6 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
||||
|
||||
communityDAO.save(context, newCommunity);
|
||||
|
||||
context.addEvent(new Event(Event.CREATE, Constants.COMMUNITY, newCommunity.getID(), newCommunity.getHandle(),
|
||||
getIdentifiers(context, newCommunity)));
|
||||
|
||||
// if creating a top-level Community, simulate an ADD event at the Site.
|
||||
if (parent == null) {
|
||||
context.addEvent(new Event(Event.ADD, Constants.SITE, siteService.findSite(context).getID(),
|
||||
Constants.COMMUNITY, newCommunity.getID(), newCommunity.getHandle(),
|
||||
getIdentifiers(context, newCommunity)));
|
||||
}
|
||||
|
||||
try {
|
||||
if (handle == null) {
|
||||
identifierService.register(context, newCommunity);
|
||||
@@ -128,6 +118,16 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
|
||||
context.addEvent(new Event(Event.CREATE, Constants.COMMUNITY, newCommunity.getID(), newCommunity.getHandle(),
|
||||
getIdentifiers(context, newCommunity)));
|
||||
|
||||
// if creating a top-level Community, simulate an ADD event at the Site.
|
||||
if (parent == null) {
|
||||
context.addEvent(new Event(Event.ADD, Constants.SITE, siteService.findSite(context).getID(),
|
||||
Constants.COMMUNITY, newCommunity.getID(), newCommunity.getHandle(),
|
||||
getIdentifiers(context, newCommunity)));
|
||||
}
|
||||
|
||||
log.info(LogManager.getHeader(context, "create_community",
|
||||
"community_id=" + newCommunity.getID())
|
||||
+ ",handle=" + newCommunity.getHandle());
|
||||
|
Reference in New Issue
Block a user