cgl.narada.event.impl
Class EventPropertiesImpl

java.lang.Object
  extended by cgl.narada.event.impl.EventPropertiesImpl
All Implemented Interfaces:
EventProperties

public class EventPropertiesImpl
extends Object
implements EventProperties


Constructor Summary
protected EventPropertiesImpl()
           
protected EventPropertiesImpl(byte[] propertyBytes)
           
 
Method Summary
 byte[] getBytes()
          Get a byte stream representation of the event header
 Object getLastModifier(Object propertyName)
          Get the last modifier of a certain property.
 Object getProperty(Object propertyName)
          Retrieve the value associated with a property.
 Enumeration getPropertyChanges(Object propertyName)
          Get a list of the changes associated with a mutable property.
 Enumeration getPropertyModifiers(Object propertyName)
          Gets a list of modifiers on a property.
 Enumeration getPropertyNames()
          Retrieve the list of property names
 Enumeration getPropertyNamesWithChangeTracking()
          Retrieve the list of property names with change tracking enabled.
 boolean hasProperties()
          Check if there are any properties associated with the event
 boolean hasPropertyChangeTracking(Object propertyName)
          Indicates if property change tracking has been enabled for the property in question.
 boolean isModified()
          Indicates if the EventProperties has been modified since the last time that it was serialized.
 boolean isMutable(Object propertyName)
          Check to see if this is a mutable property.
 void setImmutableProperty(Object propertyName, Object property, Object creator)
          Set an immutable property.
 void setMutableProperty(Object propertyName, Object property, Object modifier)
          Set a mutable property.
 String toString()
           
 void trackPropertyChanges(Object propertyName)
          Track the changes to a specific property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventPropertiesImpl

protected EventPropertiesImpl()

EventPropertiesImpl

protected EventPropertiesImpl(byte[] propertyBytes)
Method Detail

hasProperties

public boolean hasProperties()
Check if there are any properties associated with the event

Specified by:
hasProperties in interface EventProperties

getPropertyNames

public Enumeration getPropertyNames()
Retrieve the list of property names

Specified by:
getPropertyNames in interface EventProperties

getPropertyNamesWithChangeTracking

public Enumeration getPropertyNamesWithChangeTracking()
Retrieve the list of property names with change tracking enabled. Note that this just returns the list of mutable properties that have change tracking enabled for them.

Specified by:
getPropertyNamesWithChangeTracking in interface EventProperties

getProperty

public Object getProperty(Object propertyName)
                   throws NBEventException
Retrieve the value associated with a property. This method throws an exception if
(a) This propertyName is not a valid one.
(b) The specified propertyName is NULL

Specified by:
getProperty in interface EventProperties
Throws:
NBEventException

setMutableProperty

public void setMutableProperty(Object propertyName,
                               Object property,
                               Object modifier)
                        throws NBEventException
Set a mutable property. This method throws an exception if
(a) This property has been previously defined as a mutable property.
(b) Also neither the property or the property name can be NULL.

Specified by:
setMutableProperty in interface EventProperties
Throws:
NBEventException

setImmutableProperty

public void setImmutableProperty(Object propertyName,
                                 Object property,
                                 Object creator)
                          throws NBEventException
Set an immutable property. This method throws an exception if
(a) This immutable property already exists.
(b) Also neither the property or the property name can be NULL.

Specified by:
setImmutableProperty in interface EventProperties
Throws:
NBEventException

isMutable

public boolean isMutable(Object propertyName)
                  throws NBEventException
Check to see if this is a mutable property. This method throws an exception if
(a) This property does not exist
(a) The specified propetyName is NULL

Specified by:
isMutable in interface EventProperties
Throws:
NBEventException

getLastModifier

public Object getLastModifier(Object propertyName)
                       throws NBEventException
Get the last modifier of a certain property. This method works with both mutable and immutable properties. This method throws an exception if
(a) This property does not exist
(a) The specified propetyName is NULL

Specified by:
getLastModifier in interface EventProperties
Throws:
NBEventException

trackPropertyChanges

public void trackPropertyChanges(Object propertyName)
                          throws NBEventException
Track the changes to a specific property. This method throws an exception if
(a) This is an immutable property
(b) If this property does not exist.
(c) The specified propertyName is NULL

Specified by:
trackPropertyChanges in interface EventProperties
Throws:
NBEventException

hasPropertyChangeTracking

public boolean hasPropertyChangeTracking(Object propertyName)
                                  throws NBEventException
Indicates if property change tracking has been enabled for the property in question. This method throws an exception if
(a) This property does not exist
(b) The specified propertyName is not NULL

Specified by:
hasPropertyChangeTracking in interface EventProperties
Throws:
NBEventException

getPropertyChanges

public Enumeration getPropertyChanges(Object propertyName)
                               throws NBEventException
Get a list of the changes associated with a mutable property. This method throws an exception if
(a) changeTracking was not enabled on this property
(b) The specified property does not exist
(c) The specified propertyName is NULL

Specified by:
getPropertyChanges in interface EventProperties
Throws:
NBEventException

getPropertyModifiers

public Enumeration getPropertyModifiers(Object propertyName)
                                 throws NBEventException
Gets a list of modifiers on a property. This method throws an exception if
(a) changeTracking was not enabled on this property
(b) The specified property does not exist
(c) The specified propertyName is NULL

Specified by:
getPropertyModifiers in interface EventProperties
Throws:
NBEventException

getBytes

public byte[] getBytes()
Get a byte stream representation of the event header

Specified by:
getBytes in interface EventProperties

toString

public String toString()
Overrides:
toString in class Object

isModified

public boolean isModified()
Description copied from interface: EventProperties
Indicates if the EventProperties has been modified since the last time that it was serialized.

Specified by:
isModified in interface EventProperties


For comments and suggestions please send e-mail to The NaradaBrokering Project