org.dspace.app.statistics
Class AbstractUsageEvent

java.lang.Object
  extended by org.dspace.app.statistics.AbstractUsageEvent
Direct Known Subclasses:
PassiveUsageEvent, UsageEventTabFileLogger, UsageEventXMLLogger

public abstract class AbstractUsageEvent
extends Object

Base class to be extended by usage event handlers.

Version:
$Revision: 3705 $
Author:
Mark H. Wood

Field Summary
protected  EPerson eperson
          The EPerson making the request, or null if not logged on
protected  int eventType
          What happened? Viewed, logged on, etc.
protected  int objectID
          Identity of specific object which experienced the event
protected  int objectType
          Type of object which experienced the event.
protected  String sessionID
          Which session sent the query.
protected  String sourceAddress
          Address from which the query was received
static int VIEW
          Event is "object has been viewed or downloaded"
 
Constructor Summary
AbstractUsageEvent()
          Because the PluginManager can only call a plugin's niladic constructor, the constructor returns an "empty" event.
 
Method Summary
abstract  void fire()
          Called when the event is fully configured, to process the data.
 EPerson getEperson()
           
 int getEventType()
           
 int getID()
           
 int getObjectType()
           
 String getSessionID()
           
 String getSource()
           
 void setEperson(EPerson user)
           
 void setEventType(int type)
           
 void setID(int id)
           
 void setObjectType(int type)
           
 void setSessionID(String id)
           
 void setSource(String address)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW

public static final int VIEW
Event is "object has been viewed or downloaded"

See Also:
Constant Field Values

sessionID

protected String sessionID
Which session sent the query.


sourceAddress

protected String sourceAddress
Address from which the query was received


eperson

protected EPerson eperson
The EPerson making the request, or null if not logged on


eventType

protected int eventType
What happened? Viewed, logged on, etc.


objectType

protected int objectType
Type of object which experienced the event. Bitstream, item, etc. See Constants for values.


objectID

protected int objectID
Identity of specific object which experienced the event

Constructor Detail

AbstractUsageEvent

public AbstractUsageEvent()
Because the PluginManager can only call a plugin's niladic constructor, the constructor returns an "empty" event. It must be populated using the setter methods before "firing".

Method Detail

setSessionID

public void setSessionID(String id)
Parameters:
id - opaque session identifier returned by the HTTP request

getSessionID

public String getSessionID()

setSource

public void setSource(String address)
Parameters:
address - the address from which the HTTP request came

getSource

public String getSource()

setEperson

public void setEperson(EPerson user)
Parameters:
user - an object representing the logged-on user, if any. May be null.

getEperson

public EPerson getEperson()

setEventType

public void setEventType(int type)
Parameters:
type - the type of event (view, logon, etc.)

getEventType

public int getEventType()

setObjectType

public void setObjectType(int type)
Parameters:
type - the type of object experiencing the event (bitstream, etc.)

getObjectType

public int getObjectType()

setID

public void setID(int id)
Parameters:
id - the identifier of the specific object experiencing the event

getID

public int getID()

fire

public abstract void fire()
Called when the event is fully configured, to process the data.



Copyright © 2009 The DSpace Foundation. All Rights Reserved.