public class NodeEvent extends Event
| Modifier and Type | Field and Description |
|---|---|
(package private) static UtilReader |
properties |
static int |
TYPE_RELATION_CHANGE
Event type speicfic for MMBase nodes.
|
eventType, machine, TYPE_CHANGE, TYPE_DELETE, TYPE_NEW, TYPE_UNSPECIFIED| Constructor and Description |
|---|
NodeEvent(String machineName,
String builderName,
int nodeNumber,
Map<String,Object> oldValues,
Map<String,Object> newValues,
int eventType) |
| Modifier and Type | Method and Description |
|---|---|
(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() |
clone, getMachine, getType, isLocalpublic static final int TYPE_RELATION_CHANGE
static final UtilReader properties
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 eventstatic 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 ofpublic 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
listpublic final String getBuilderName()
public final int getNodeNumber()
public boolean isRelation()
protected static String getEventTypeGuiName(int eventType)
public static String newTypeToOldType(int eventType)
eventType - must be c,d,n or rpublic static int oldTypeToNewType(String eventType)
public static int oldTypeToNewType(char eventType)
eventType - public boolean hasChanged(String fieldName)
fieldName - public final Map<String,Object> getOldValues()
public final Map<String,Object> getNewValues()
public static void main(String[] args)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}