TPTP 4.3.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.common.event
Class ExecutionEvent

java.lang.Object
  extended byorg.eclipse.hyades.test.common.event.ExecutionEvent
All Implemented Interfaces:
IEventConstants
Direct Known Subclasses:
InvocationEvent, LoopEvent, MessageEvent, TimedEvent, TypedEvent, VerdictEvent

public class ExecutionEvent
extends java.lang.Object
implements IEventConstants

Mirror of TPFExecutionEvent for the execution environment with support for annotations. An annotation can be a file or byte array.

Since:
October 7, 2005

Field Summary
 
Fields inherited from interface org.eclipse.hyades.test.common.event.IEventConstants
CONFLICT_IGNORE, CONFLICT_NONE, CONFLICT_OVERWRITE, CONFLICT_OVERWRITE_IF_EARLIEST, CONFLICT_OVERWRITE_IF_LATEST, NOT_INITIALIZED_VALUE, ROOT_PARENT
 
Constructor Summary
ExecutionEvent()
           
 
Method Summary
 void addAnnotation(EventAnnotation eventAnnotation)
          Adds the parameter annotation (EventAnnotation) to add to the list of annotations.
 void addProperty(EventProperty eventProperty)
          Adds the parameter property (EventProperty) to add to the list of properties.
 void addRepositoryRecords(RepositoryRecord record)
          Adds the specified record (RepositoryRecord) to add to the list of repository records.
protected  void addXMLAnnotations(java.lang.StringBuffer xmlBuffer)
          Add the annotation attributes and CDATA sections to the xml StringBuffer that is used by the toString() method.
protected  void addXMLAttributes(java.lang.StringBuffer xml)
          Add the attributes to the xml StringBuffer that is used by the toString() method.
protected  void addXMLProperties(java.lang.StringBuffer xml)
          Add the property attributes to the xml StringBuffer that is used by the toString() method.
protected  void addXMLRepositoryRecords(java.lang.StringBuffer xml)
          Add the repository record attributes to the xml StringBuffer that is used by the toString() method.
 void clearAnnotations()
          Clears the list of annotations (EventAnnotation).
 void clearProperties()
          Clears the list of properties (EventProperty).
 void clearRepositoryRecords()
          Clears the list of repository records (RepositoryRecord).
 java.util.List getAnnotations()
          Returns the non-null list of annotations (EventAnnotation).
 int getConflict()
           
 java.lang.String getEventType()
           
 java.lang.String getId()
          Returns the id of this event.
 java.lang.String getName()
           
 java.lang.String getOwnerId()
          Returns the owner id of this event.
 java.lang.String getParentId()
          Returns the ID of the parent event
 java.util.ArrayList getProperties()
          Returns the non-null list of properties (EventProperty).
 java.util.ArrayList getRepositoryRecords()
          Returns the non-null list of repository records (RepositoryRecord).
 java.lang.String getSortBy()
           
 java.lang.String getText()
          Returns the text of this event.
 long getTimestamp()
          Returns the timestamp of this event.
protected  java.lang.String getXMLAnnotationRoot()
          Returns the string that is used as the tag for annotation xml fragment generated by the toString() method.
protected  java.lang.String getXMLPropertyRoot()
          Returns the string that is used as the tag for property xml fragment generated by the toString() method.
protected  java.lang.String getXMLRepositoryRecordRoot()
          Returns the string that is used as the tag for repository record xml fragment generated by the toString() method.
protected  java.lang.String getXMLRoot()
          Returns the string that is used as the root of the xml fragment generated by the toString() method.
 void setConflict(int conflict)
          This attribute indicates what should be done by the execution history loader if it finds an existing event with the same credentials (hierarchical id).
 void setEventType(java.lang.String eventType)
          This attribute is optional.
 void setId(java.lang.String value)
          Sets the id of this event.
 void setName(java.lang.String name)
          If this attribute is speicified, the execution history viewer will use it as the label of the tree element for this event.
 void setOwnerId(java.lang.String value)
          Sets the owner id of this event.
 void setParentId(java.lang.String parentId)
          Sets the ID of the parent event
 void setSortBy(java.lang.String sortBy)
          Set this attribute if this event needs to be sorted within the scope of its immediate parent in the execution history.
 void setText(java.lang.String value)
          Sets the text of this event.
 void setTimestamp(long value)
          Sets the timestamp of this event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutionEvent

public ExecutionEvent()
Method Detail

getId

public java.lang.String getId()
Returns the id of this event.

Returns:
String

setId

public void setId(java.lang.String value)
Sets the id of this event.

Parameters:
value -

getParentId

public java.lang.String getParentId()
Returns the ID of the parent event

Returns:
String

setParentId

public void setParentId(java.lang.String parentId)
Sets the ID of the parent event

Parameters:
parentId -

getOwnerId

public java.lang.String getOwnerId()
Returns the owner id of this event.

Returns:
String

setOwnerId

public void setOwnerId(java.lang.String value)
Sets the owner id of this event.

Parameters:
value -

getTimestamp

public long getTimestamp()
Returns the timestamp of this event.

Returns:
String

setTimestamp

public void setTimestamp(long value)
Sets the timestamp of this event. The timestamp is set by the toString() method if this getTimestamp() returns 0.

Parameters:
value -

getText

public java.lang.String getText()
Returns the text of this event.

Returns:
String

setText

public void setText(java.lang.String value)
Sets the text of this event.

Returns:
String

getEventType

public java.lang.String getEventType()
Returns:
Returns the eventType.

setEventType

public void setEventType(java.lang.String eventType)
This attribute is optional. If provided, the execution history viewer, will query the extension point that will need to be provided, for the label of the tree element for this event, in the execution history viewer.

Parameters:
eventType - The eventType to set.

getName

public java.lang.String getName()
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
If this attribute is speicified, the execution history viewer will use it as the label of the tree element for this event. However, if the eventType is specified, the it will query the corresponding extension point for the label text.

Parameters:
name - The name to set.

getSortBy

public java.lang.String getSortBy()
Returns:
Returns the sortBy.

setSortBy

public void setSortBy(java.lang.String sortBy)
Set this attribute if this event needs to be sorted within the scope of its immediate parent in the execution history. This attribute does not make it all the way to the execution history model but is used by the loaders to figure out sorting.

Parameters:
sortBy - The sortBy to set.

getConflict

public int getConflict()
Returns:
Returns the conflict.

setConflict

public void setConflict(int conflict)
This attribute indicates what should be done by the execution history loader if it finds an existing event with the same credentials (hierarchical id). Default behavior isto not worry about conflicts and just insert this event into the execution history

Parameters:
conflict - The conflict to set.

getProperties

public java.util.ArrayList getProperties()
Returns the non-null list of properties (EventProperty).

Returns:
List of properties (EventProperty).

addProperty

public void addProperty(EventProperty eventProperty)
Adds the parameter property (EventProperty) to add to the list of properties.

Parameters:
eventProperty - The property to be added to the list of properties.

clearProperties

public void clearProperties()
Clears the list of properties (EventProperty).


getAnnotations

public java.util.List getAnnotations()
Returns the non-null list of annotations (EventAnnotation).

Returns:
List of annotations (EventAnnotation).

addAnnotation

public void addAnnotation(EventAnnotation eventAnnotation)
Adds the parameter annotation (EventAnnotation) to add to the list of annotations.

Parameters:
eventAnnotation - The annotation to be added to the list of annotations.

clearAnnotations

public void clearAnnotations()
Clears the list of annotations (EventAnnotation).


getRepositoryRecords

public java.util.ArrayList getRepositoryRecords()
Returns the non-null list of repository records (RepositoryRecord).

Returns:
List of repository records (RepositoryRecord).
Provisional API: This API is subject to change in the next release.

addRepositoryRecords

public void addRepositoryRecords(RepositoryRecord record)
Adds the specified record (RepositoryRecord) to add to the list of repository records.

Parameters:
record - The repository records to be added to the list of repository records.
Provisional API: This API is subject to change in the next release.

clearRepositoryRecords

public void clearRepositoryRecords()
Clears the list of repository records (RepositoryRecord).

Provisional API: This API is subject to change in the next release.

toString

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

getXMLRoot

protected java.lang.String getXMLRoot()
Returns the string that is used as the root of the xml fragment generated by the toString() method.

Returns:
a not null String

getXMLPropertyRoot

protected java.lang.String getXMLPropertyRoot()
Returns the string that is used as the tag for property xml fragment generated by the toString() method.

Returns:
a not null String

getXMLAnnotationRoot

protected java.lang.String getXMLAnnotationRoot()
Returns the string that is used as the tag for annotation xml fragment generated by the toString() method.

Returns:
a not null String

getXMLRepositoryRecordRoot

protected java.lang.String getXMLRepositoryRecordRoot()
Returns the string that is used as the tag for repository record xml fragment generated by the toString() method.

Returns:
a not null String
Provisional API: This API is subject to change in the next release.

addXMLAttributes

protected void addXMLAttributes(java.lang.StringBuffer xml)
Add the attributes to the xml StringBuffer that is used by the toString() method.

Parameters:
xml -

addXMLProperties

protected void addXMLProperties(java.lang.StringBuffer xml)
Add the property attributes to the xml StringBuffer that is used by the toString() method.

Parameters:
xml -

addXMLAnnotations

protected void addXMLAnnotations(java.lang.StringBuffer xmlBuffer)
Add the annotation attributes and CDATA sections to the xml StringBuffer that is used by the toString() method.

Parameters:
xmlBuffer -

addXMLRepositoryRecords

protected void addXMLRepositoryRecords(java.lang.StringBuffer xml)
Add the repository record attributes to the xml StringBuffer that is used by the toString() method.

Parameters:
xml -
Provisional API: This API is subject to change in the next release.

TPTP 4.3.0 Testing Tools Project
Public API Specification