| java.lang.Object org.mmbase.core.event.Event org.mmbase.core.event.NodeEvent
NodeEvent | public class NodeEvent extends Event (Code) | | 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.
author: Ernst Bunders since: MMBase-1.8 version: $Id: NodeEvent.java,v 1.36 2008/02/07 16:44:56 michiel Exp $ |
TYPE_RELATION_CHANGE | final public static int TYPE_RELATION_CHANGE(Code) | | Event type speicfic for MMBase nodes.
|
NodeEvent | public NodeEvent(String machineName, String builderName, int nodeNumber, Map<String, Object> oldValues, Map<String, Object> newValues, int eventType)(Code) | | Parameters: machineName - (MMBase) name of the server Parameters: builderName - name of builder of node event is about Parameters: oldValues - map with fields and their values that have been changed by the event Parameters: newValues - map with new values of changed fields Parameters: eventType - the type of event |
getBuilderName | final public String getBuilderName()(Code) | | Returns the builderName. |
getChangedFields | final public Set<String> getChangedFields()(Code) | | a set containing the names of the fields that have changed |
getEventTypeGuiName | protected static String getEventTypeGuiName(int eventType)(Code) | | |
getNewValue | final public Object getNewValue(String fieldName)(Code) | | Parameters: fieldName - the field you want the new value of (in case of changeevent), or null if the fieldName was not found in the new valuelist the new value of the field |
getNewValues | final public Map<String, Object> getNewValues()(Code) | | new values can be different things.
- if the event type is 'new' this collection contains all the fields of the node.
- if the event type is 'changed' this collection contains the new values of the changed fields.
- if the event type is 'delete' this collection is empty.
a map where the key is a fieldname and the value the field's value |
getNodeNumber | final public int getNodeNumber()(Code) | | Returns the nodeNumber. |
getOldValue | final public Object getOldValue(String fieldName)(Code) | | Parameters: fieldName - the field you want to get the old value of an Object containing the old value (in case of change event), ornull if the fieldName was not found in the old value list |
getOldValues | final public Map<String, Object> getOldValues()(Code) | | old values can be different things.
- if the event type is 'new' this collection is empty.
- if the event type is 'changed' this collection contains the old values of the changed fields.
- if the event type is 'delete' this collection contains all the values of the node to be deleted.
a map where the key is a fieldname and the value the field's value |
hasChanged | public boolean hasChanged(String fieldName)(Code) | | utility method: check if a certain field has changed
Parameters: fieldName - true if the field of given name is among the changed fields |
hashCode | public int hashCode()(Code) | | |
newTypeToOldType | public static String newTypeToOldType(int eventType)(Code) | | For conveneance: conversion of the new event type indication to the old
style
Parameters: eventType - must be c,d,n or r A String describing the type of an event. (like "c" (change), "d" (delete), "n" (new), or "r" (relation change)) |
oldTypeToNewType | public static int oldTypeToNewType(String eventType)(Code) | | For conveneance: conversion of the old event type indication to the new
style
Parameters: eventType - |
|
|