|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.events.ActivemathEvent
public class ActivemathEvent
Abstract base class for Activemath events.
Each event has the following attributes:
Concrete subclasses must be used for each event type. Note: This class is no longer formally abstract, although it still should be treated as such. This was necessary to fix Hibernate queries on broken event databases (AMATH-1177).
| Field Summary | |
|---|---|
protected String |
bookId
|
protected String |
groupId
|
protected long |
id
Id of event (defaults to -1) |
protected String |
itemId
|
protected String |
sessionId
|
protected Object |
source
Source/producer of event |
protected long |
timestamp
System time when the event happened |
protected String |
type
Type of event ("LoggedIn", "StartExercise", ...) |
protected String |
userId
|
| Constructor Summary | |
|---|---|
ActivemathEvent()
|
|
ActivemathEvent(String type)
Create a new event. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Order events. |
void |
dispatchFinished()
A hook for event generators to indicate that the dispatch of the event is finished. |
String |
getGroupId()
|
long |
getId()
|
String |
getItemId()
|
Object |
getSource()
|
long |
getTimestamp()
|
String |
getType()
|
void |
setGroupId(String value)
|
void |
setId(long id)
|
void |
setItemId(String value)
|
void |
setSource(Object source)
|
void |
setTimestamp(long timestamp)
Allow manual override of timestamp |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String type
protected long timestamp
protected Object source
protected long id
-1)
protected String userId
protected String groupId
protected String sessionId
protected String itemId
protected String bookId
| Constructor Detail |
|---|
public ActivemathEvent()
public ActivemathEvent(String type)
timestamp is initialized with current system time.
| Method Detail |
|---|
public String getType()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - -
the timestamp to set.public Object getSource()
public void setSource(Object source)
source - The source to set.public long getId()
public void setId(long id)
id - The id to set.public String getGroupId()
public void setGroupId(String value)
public String getItemId()
public void setItemId(String value)
public String toString()
toString in class Objectpublic int compareTo(Object o)
Event order is defined by
compareTo in interface Comparable
public void dispatchFinished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||