org.sakaiproject.component.legacy.event
Class BaseEventTrackingService.BaseEvent

java.lang.Object
  extended byorg.sakaiproject.component.legacy.event.BaseEventTrackingService.BaseEvent
All Implemented Interfaces:
Event, Serializable
Enclosing class:
BaseEventTrackingService

protected class BaseEventTrackingService.BaseEvent
extends Object
implements Event, Serializable

BaseEvent is the implementation of the core Event interface.

Event objects are posted to the EventTracking service, and may be listened for.

Version:
1.0
Author:
University of Michigan, CHEF Software Development Team, Lance Speelmon
See Also:
org.chefproject.core.Event, Serialized Form

Field Summary
protected  String m_id
          The Event's id string.
protected  boolean m_modify
          The Event's modify flag (true if the event caused a resource modification).
protected  int m_priority
          The Event's notification priority.
protected  String m_resource
          The Event's resource reference string.
protected  long m_seq
          The Event's sequence number.
protected  String m_session
          The Event's session id string.
protected  Time m_time
          Event creation time.
protected  String m_user
          The Event's user id string.
 
Constructor Summary
BaseEventTrackingService.BaseEvent(long seq, String event, String resource, boolean modify, int priority)
          Construct
BaseEventTrackingService.BaseEvent(String event, String resource, boolean modify, int priority)
          Construct
 
Method Summary
 String getEvent()
          Access the event id string
 boolean getModify()
          Is this event one that caused a modify to the resource, or just an access.
 int getPriority()
          Access the event's notification priority.
 String getResource()
          Access the resource reference.
 String getSessionId()
          Access the UsageSession id.
 String getUserId()
          Access the User id.
protected  void setEvent(String id)
          Set the event id.
protected  void setResource(String id)
          Set the resource id.
protected  void setSessionId(String id)
          Set the session id.
protected  void setUserId(String id)
          Set the user id.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_seq

protected long m_seq
The Event's sequence number.


m_id

protected String m_id
The Event's id string.


m_resource

protected String m_resource
The Event's resource reference string.


m_session

protected String m_session
The Event's session id string. May be null.


m_user

protected String m_user
The Event's user id string. May be null.


m_modify

protected boolean m_modify
The Event's modify flag (true if the event caused a resource modification).


m_priority

protected int m_priority
The Event's notification priority.


m_time

protected Time m_time
Event creation time.

Constructor Detail

BaseEventTrackingService.BaseEvent

public BaseEventTrackingService.BaseEvent(String event,
                                          String resource,
                                          boolean modify,
                                          int priority)
Construct

Parameters:
event - The Event id.
resource - The resource id.
modify - If the event caused a modify, true, if it was just an access, false.
priority - The Event's notification priority.

BaseEventTrackingService.BaseEvent

public BaseEventTrackingService.BaseEvent(long seq,
                                          String event,
                                          String resource,
                                          boolean modify,
                                          int priority)
Construct

Parameters:
seq - The event sequence number.
event - The Event id.
resource - The resource id.
modify - If the event caused a modify, true, if it was just an access, false.
priority - The Event's notification priority.
Method Detail

getEvent

public String getEvent()
Access the event id string

Specified by:
getEvent in interface Event
Returns:
The event id string.

getResource

public String getResource()
Access the resource reference.

Specified by:
getResource in interface Event
Returns:
The resource reference string.

getSessionId

public String getSessionId()
Access the UsageSession id. If null, check for a User id.

Specified by:
getSessionId in interface Event
Returns:
The UsageSession id string.

getUserId

public String getUserId()
Access the User id. If null, check for a session id.

Specified by:
getUserId in interface Event
Returns:
The User id string.

getModify

public boolean getModify()
Is this event one that caused a modify to the resource, or just an access.

Specified by:
getModify in interface Event
Returns:
true if the event caused a modify to the resource, false if it was just an access.

getPriority

public int getPriority()
Access the event's notification priority.

Specified by:
getPriority in interface Event
Returns:
The event's notification priority.

setEvent

protected void setEvent(String id)
Set the event id.

Parameters:
id - The event id string.

setResource

protected void setResource(String id)
Set the resource id.

Parameters:
id - The resource id string.

setSessionId

protected void setSessionId(String id)
Set the session id.

Parameters:
id - The session id string.

setUserId

protected void setUserId(String id)
Set the user id.

Parameters:
id - The user id string.

toString

public String toString()
Returns:
A representation of this event's values as a string.