|
||||||||||
| 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
public class 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 | |
|---|---|
(package private) static UtilReader |
properties
|
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<String,Object> oldValues,
Map<String,Object> newValues,
int eventType)
|
|
| Method Summary | |
|---|---|
(package private) static void |
configure()
Reads nodeevents.xml |
boolean |
equals(Object o)
|
String |
getBuilderName()
|
Set<String> |
getChangedFields()
|
protected static String |
getEventTypeGuiName(int eventType)
|
Object |
getNewValue(String fieldName)
|
Map<String,Object> |
getNewValues()
new values can be different things. |
int |
getNodeNumber()
|
Object |
getOldValue(String fieldName)
|
Map<String,Object> |
getOldValues()
old values can be different things. |
static Class[] |
getRequiredValueTypes()
Gets the types (interfaces) which values must implement in the values and oldvalues maps. |
static Class[] |
getUnacceptableValueTypes()
Sets the types of which values are unacceptable in the values and oldvalues maps. |
boolean |
hasChanged(String fieldName)
utility method: check if a certain field has changed |
int |
hashCode()
|
boolean |
isRelation()
Especially events of the type NEW can also be about relations. |
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(char eventType)
For conveneance: conversion of the old event type indication to the new style |
static int |
oldTypeToNewType(String eventType)
|
(package private) static void |
setRequiredValueTypes(Class[] types)
|
(package private) static void |
setUnacceptableValueTypes(Class[] types)
|
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
static final UtilReader properties
| Constructor Detail |
|---|
public NodeEvent(String machineName,
String builderName,
int nodeNumber,
Map<String,Object> oldValues,
Map<String,Object> 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 event. This may be nullnewValues - map with new values of changed fieldseventType - the type of event| Method Detail |
|---|
static void setUnacceptableValueTypes(Class[] types)
getUnacceptableValueTypes()static void setRequiredValueTypes(Class[] types)
getRequiredValueTypes()public static Class[] getUnacceptableValueTypes()
public static Class[] getRequiredValueTypes()
static void configure()
public final Object getOldValue(String fieldName)
fieldName - the field you want to get the old value of
public final Set<String> 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 boolean isRelation()
public String toString()
toString in class Objectprotected 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)
public static int oldTypeToNewType(char eventType)
eventType - public boolean hasChanged(String fieldName)
fieldName -
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic final Map<String,Object> getOldValues()
public final Map<String,Object> getNewValues()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||