|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.core.event.Event
org.mmbase.core.event.NodeEvent
This class communicates a node event. in case of a change event, it contains a map of changed values, mapped to their field's name, as well as the previous values of the changed fields.
| Field Summary | |
static int |
TYPE_RELATION_CHANGE
Event type speicfic for MMBase nodes. |
| Fields inherited from class org.mmbase.core.event.Event |
eventType, machine, TYPE_CHANGE, TYPE_DELETE, TYPE_NEW, TYPE_UNSPECIFIED |
| Constructor Summary | |
NodeEvent(String machineName,
String builderName,
int nodeNumber,
Map oldValues,
Map newValues,
int eventType)
|
|
| Method Summary | |
boolean |
equals(Object o)
|
String |
getBuilderName()
|
Set |
getChangedFields()
|
protected static String |
getEventTypeGuiName(int eventType)
|
Object |
getNewValue(String fieldName)
|
Map |
getNewValues()
new values can be different things. |
int |
getNodeNumber()
|
Object |
getOldValue(String fieldName)
|
Map |
getOldValues()
old values can be different things. |
boolean |
hasChanged(String fieldName)
utility method: check if a certain field has changed |
int |
hashCode()
|
static void |
main(String[] args)
|
static String |
newTypeToOldType(int eventType)
For conveneance: conversion of the new event type indication to the old style |
static int |
oldTypeToNewType(String eventType)
For conveneance: conversion of the old event type indication to the new style |
String |
toString()
|
| Methods inherited from class org.mmbase.core.event.Event |
clone, getMachine, getType, isLocal |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TYPE_RELATION_CHANGE
| Constructor Detail |
public NodeEvent(String machineName,
String builderName,
int nodeNumber,
Map oldValues,
Map newValues,
int eventType)
machineName - (MMBase) name of the serverbuilderName - name of builder of node event is aboutoldValues - map with fields and their values that have been changed by the eventnewValues - map with new values of changed fieldseventType - the type of event| Method Detail |
public final Object getOldValue(String fieldName)
fieldName - the field you want to get the old value of
public final Set getChangedFields()
public final Object getNewValue(String fieldName)
fieldName - the field you want the new value of (in case of change
event), or null if the fieldName was not found in the new value
list
public final String getBuilderName()
public final int getNodeNumber()
public String toString()
protected static String getEventTypeGuiName(int eventType)
public static String newTypeToOldType(int eventType)
eventType - must be c,d,n or r
public static int oldTypeToNewType(String eventType)
eventType - public boolean hasChanged(String fieldName)
fieldName -
public int hashCode()
public boolean equals(Object o)
public final Map getOldValues()
public final Map getNewValues()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||