mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Restoring Usage Event Listener until proper patch is prepared
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6132 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.usage;
|
||||
|
||||
import org.dspace.services.EventService;
|
||||
import org.dspace.services.model.EventListener;
|
||||
|
||||
/**
|
||||
* AbstractUsageEventListener is used as the base class for listening events running
|
||||
* in the EventService.
|
||||
*
|
||||
* @author Mark Diggory (mdiggory at atmire.com)
|
||||
* @version $Revision: $
|
||||
*/
|
||||
public abstract class AbstractUsageEventListener implements EventListener {
|
||||
|
||||
public AbstractUsageEventListener() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty String[] flags to have Listener
|
||||
* consume any event name prefixes.
|
||||
*/
|
||||
public String[] getEventNamePrefixes() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Currently consumes events generated for
|
||||
* all resources.
|
||||
*/
|
||||
public String getResourcePrefix() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setEventService(EventService service) {
|
||||
if(service != null)
|
||||
{
|
||||
service.registerEventListener(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalStateException("EventService handed to Listener cannot be null");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user