mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
added event that allow to update solr document of collection and community
This commit is contained in:
@@ -524,6 +524,8 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
|||||||
|
|
||||||
// register this as the admin group
|
// register this as the admin group
|
||||||
collection.setAdmins(admins);
|
collection.setAdmins(admins);
|
||||||
|
context.addEvent(new Event(Event.MODIFY, Constants.COLLECTION, collection.getID(),
|
||||||
|
null, getIdentifiers(context, collection)));
|
||||||
return admins;
|
return admins;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,6 +542,8 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
|||||||
|
|
||||||
// Remove the link to the collection table.
|
// Remove the link to the collection table.
|
||||||
collection.setAdmins(null);
|
collection.setAdmins(null);
|
||||||
|
context.addEvent(new Event(Event.MODIFY, Constants.COLLECTION, collection.getID(),
|
||||||
|
null, getIdentifiers(context, collection)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -657,8 +661,11 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
|||||||
collection.clearModified();
|
collection.clearModified();
|
||||||
}
|
}
|
||||||
if (collection.isMetadataModified()) {
|
if (collection.isMetadataModified()) {
|
||||||
collection.clearDetails();
|
context.addEvent(new Event(Event.MODIFY_METADATA, Constants.COLLECTION, collection.getID(),
|
||||||
|
collection.getDetails(),getIdentifiers(context, collection)));
|
||||||
|
collection.clearModified();
|
||||||
}
|
}
|
||||||
|
collection.clearDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -287,6 +287,8 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
|||||||
|
|
||||||
// register this as the admin group
|
// register this as the admin group
|
||||||
community.setAdmins(admins);
|
community.setAdmins(admins);
|
||||||
|
context.addEvent(new Event(Event.MODIFY, Constants.COMMUNITY, community.getID(),
|
||||||
|
null, getIdentifiers(context, community)));
|
||||||
return admins;
|
return admins;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,6 +304,8 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
|||||||
|
|
||||||
// Remove the link to the community table.
|
// Remove the link to the community table.
|
||||||
community.setAdmins(null);
|
community.setAdmins(null);
|
||||||
|
context.addEvent(new Event(Event.MODIFY, Constants.COMMUNITY, community.getID(),
|
||||||
|
null, getIdentifiers(context, community)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user