WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class EventKeyInfo

java.lang.Object
  |
  +--com.bea.wlpi.common.EventKeyInfo

public class EventKeyInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Holds information about an XML event key. When WebLogic Process Integrator processes an XML document, it uses an event key to identify the workflow definitions or instance(s) that are associated with the incoming document. The EventKeyInfo object defines a relationship between a document element name and a workflow expression. The system evaluates the expression against the root element of an incoming document (of the specified type) to yield a key value that uniquely identifies that document instance, and thus any workflow definitions or instances to which it relates. Note that the document type is characterized by the document element name, not the Document Type Definition.

Objects of this class override the boolean equals(Object) and implement the comparable interface. Homogeneous collections containing objects of this class may, therefore, be searched and sorted using the Collection.contains(Object), List.indexOf(Object), Collections.sort(List) methods.

See Also:
Serialized Form

Constructor Summary
EventKeyInfo(java.lang.String root, java.lang.String expr)
          Create a new XML event key info object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare two EventKeyInfo objects.
 boolean equals(java.lang.Object obj)
          Test two EventKeyInfo objects for equality.
 java.lang.String getExpr()
          Return a workflow expression that yields a unique key for a document.
 java.lang.String getRoot()
          Return the XML document element name.
 void setExpr(java.lang.String expr)
          Set the unique key expression.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventKeyInfo

public EventKeyInfo(java.lang.String root,
                    java.lang.String expr)
Create a new XML event key info object.
Parameters:
root - The XML document element name.
expr - Workflow expression that yields a unique key for a document instance when evaluated against that document.
Method Detail

getRoot

public final java.lang.String getRoot()
Return the XML document element name.
Returns:
The XML document element name to which this event key relates.

getExpr

public final java.lang.String getExpr()
Return a workflow expression that yields a unique key for a document.
Returns:
Workflow expression that yields a unique key for a document instance when evaluated against that document.
See Also:
setExpr(java.lang.String)

setExpr

public final void setExpr(java.lang.String expr)
Set the unique key expression.
Parameters:
expr - Unique key expression, conformant with the workflow expression syntax.
See Also:
getExpr()

equals

public boolean equals(java.lang.Object obj)
Test two EventKeyInfo objects for equality.
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to compare this one.
Returns:
true if obj is an instance of EventKeyInfo with the same root as this one.
See Also:
compareTo(java.lang.Object)

compareTo

public int compareTo(java.lang.Object o)
Compare two EventKeyInfo objects.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Object with which to compare this one. Must be null or an instance of EventKeyInfo.
Returns:
The result of comparing the root members using the String.compareTo(Object) method.
Throws:
java.lang.ClassCastException - if o is not an instance of EventKeyInfo.
See Also:
equals(java.lang.Object)

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.