com.waveset.object
Class MetaEvent

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.MetaEvent
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject

public class MetaEvent
extends AbstractXmlObject

A MetaEvent stores information about how to detect and respond to identity related events that occur in Identity Manager.

Version:
$Revision: 1.5 $

Nested Class Summary
static class MetaEvent.Type
          Enumeration class of the event types to detect.
 
Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
MetaEvent(org.w3c.dom.Element e)
          Constructor that takes an Element (required by XmlObject).
MetaEvent(MetaEvent.Type eventType)
          Create a MetaEvent for the given type.
 
Method Summary
 void addResponse(MetaEventResponse response)
          Add a response for this event.
 void addSourceResource(ObjectRef source, ObjectRef detectionRule)
          Add a source resource to this event.
 void clearSourceResources()
          Clear the source resources and their event detection rules.
 boolean detectEventNatively(ObjectRef source)
          Return whether the event is to be detected natively on the given resource or not.
 boolean equals(java.lang.Object o)
           
 java.lang.String getElementName()
          Return the element name.
 ObjectRef getEventDetectionRule(ObjectRef source)
          Return the ObjectRef of the event detection rule for the given source resource, or null if the event is detected natively.
 MetaEvent.Type getEventType()
           
 java.util.List getReferences()
          Return all ObjectRefs referenced by this attribute.
 java.util.List getResponses()
           
 java.util.List getSourceResources()
          Return a List of ObjectRefs of all source resource.
 int hashCode()
           
 void setEventType(MetaEvent.Type eventType)
           
 void setResponses(java.util.List responses)
          Set the responses for this event.
 java.lang.String toString()
           
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

MetaEvent

public MetaEvent(MetaEvent.Type eventType)
Create a MetaEvent for the given type.

Parameters:
eventType - The non-null event type.

MetaEvent

public MetaEvent(org.w3c.dom.Element e)
          throws WavesetException
Constructor that takes an Element (required by XmlObject).

Parameters:
e - The Element from which to construct this object.
Method Detail

getReferences

public java.util.List getReferences()
Return all ObjectRefs referenced by this attribute.

Returns:
All ObjectRefs referenced by this attribute.
See Also:
PersistentObject.getReferences()

getEventType

public MetaEvent.Type getEventType()
Returns:
Returns the eventType.

setEventType

public void setEventType(MetaEvent.Type eventType)
Parameters:
eventType - The eventType to set.

getSourceResources

public java.util.List getSourceResources()
Return a List of ObjectRefs of all source resource.

Returns:
A List of ObjectRefs of all source resource.

addSourceResource

public void addSourceResource(ObjectRef source,
                              ObjectRef detectionRule)
Add a source resource to this event.

Parameters:
source - The source resource to add.
detectionRule - A possibly null ObjectRef of the Rule to execute to detect the event on the given resource.

clearSourceResources

public void clearSourceResources()
Clear the source resources and their event detection rules.


getEventDetectionRule

public ObjectRef getEventDetectionRule(ObjectRef source)
Return the ObjectRef of the event detection rule for the given source resource, or null if the event is detected natively.

Parameters:
source - The ObjectRef of the source for which to retrieve the event detection rule.
Returns:
The ObjectRef of the event detection rule for the given source resource, or null if the event is detected natively.

detectEventNatively

public boolean detectEventNatively(ObjectRef source)
Return whether the event is to be detected natively on the given resource or not.

Parameters:
source - The ObjectRef of the source resource on which the event is to be detected.
Returns:
Whether the event is to be detected natively on the given resource or not.

getResponses

public java.util.List getResponses()
Returns:
Returns the responses.

setResponses

public void setResponses(java.util.List responses)
Set the responses for this event.

Parameters:
responses - The responses to set.

addResponse

public void addResponse(MetaEventResponse response)
                 throws WavesetException
Add a response for this event.

Parameters:
response - The response to add.
Throws:
WavesetException - If another response of this type is already defined for this event.

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getElementName

public java.lang.String getElementName()
Description copied from class: AbstractXmlObject
Return the element name.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject

toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Description copied from class: AbstractXmlObject
Serialize into a buffer with optional indentation. This must be implemented by the subclass.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject