com.ibm.events.access
Class AddExtendedDataElement

java.lang.Object
  extended bycom.ibm.events.access.AddExtendedDataElement
All Implemented Interfaces:
EventChangeRequest, java.io.Serializable

public class AddExtendedDataElement
extends java.lang.Object
implements EventChangeRequest

A change request that creates a new extended data element. This change request will always create an extended data element even if an element already exists with the same name and type.

The parent location path should be of the form CommonBaseEvent/extendedDataElement[@name=’myElement’]

If the add is for a top level element then the parent location path should be just CommonBaseEvent

Since:
6.0.0
Version:
1.5 5/7/07
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.events.access.EventChangeRequest
ADD_CONTEXT_DATA_ELEMENT_CHANGE_REQUEST, ADD_EXTENDED_DATA_ELEMENT_CHANGE_REQUEST, CBE_XPATH_LOCATION_PREFIX, CHANGE_REQUEST_STRINGS, CREATE_EMPTY_EXTENDED_DATA_ELEMENT_CHANGE_REQUEST, UPDATE_ATTRIBUTE_CHANGE_REQUEST, UPDATE_EVENT_ASSOCIATION_CHANGE_REQUEST, UPDATE_EXTENDED_DATA_ELEMENT_CHANGE_REQUEST
 
Constructor Summary
AddExtendedDataElement(java.lang.String globalInstanceId, java.lang.String parentLocationPath, org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement)
          Creates a new AddExtendedDataElement object.
 
Method Summary
 int getChangeRequestType()
          Get the type of change request this object represents.
 org.eclipse.hyades.logging.events.cbe.ExtendedDataElement getExtendedDataElement()
          Get the extended data element that this change request is representing.
 java.lang.String getGlobalInstanceId()
          Get the global instance ID of the event that this change request is modifying.
 java.lang.String getParentLocationPath()
          Get the parent element XPath location.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddExtendedDataElement

public AddExtendedDataElement(java.lang.String globalInstanceId,
                              java.lang.String parentLocationPath,
                              org.eclipse.hyades.logging.events.cbe.ExtendedDataElement extendedDataElement)
Creates a new AddExtendedDataElement object.

Parameters:
globalInstanceId - The global instance ID of the event whose attributes will be updated.
parentLocationPath - XPath location of the parent element for the new extended data element.
extendedDataElement - The extended data element to be added.
Throws:
java.lang.IllegalArgumentException - If one of the following conditions occur
  1. any of the parameters are null
  2. parentLocationPath does not start with CommonBaseEvent
  3. extendedDataElement is not valid
  4. extendedDataElement contains children
Method Detail

getChangeRequestType

public int getChangeRequestType()
Description copied from interface: EventChangeRequest
Get the type of change request this object represents.

Specified by:
getChangeRequestType in interface EventChangeRequest
Returns:
An integer that matches to one of the change request type constants found in the interface EventChangeRequest.
See Also:
EventChangeRequest.getChangeRequestType()

getExtendedDataElement

public org.eclipse.hyades.logging.events.cbe.ExtendedDataElement getExtendedDataElement()
Get the extended data element that this change request is representing.

Returns:
The extended data element.

getGlobalInstanceId

public java.lang.String getGlobalInstanceId()
Description copied from interface: EventChangeRequest
Get the global instance ID of the event that this change request is modifying.

Specified by:
getGlobalInstanceId in interface EventChangeRequest
Returns:
A string representing the global instance ID of the event that this change request is updating.
See Also:
EventChangeRequest.getGlobalInstanceId()

getParentLocationPath

public java.lang.String getParentLocationPath()
Get the parent element XPath location.

Returns:
The parent element XPath location.

toString

public java.lang.String toString()
See Also:
Object.toString()