com.telelogic.cs.api
Class GeneralEvent

java.lang.Object
  extended by com.telelogic.cs.api.TriggerEvent
      extended by com.telelogic.cs.api.GeneralEvent
All Implemented Interfaces:
CollectibleEvent

public class GeneralEvent
extends TriggerEvent
implements CollectibleEvent

Sent during any modification of an attribute, a submission, or transition.

A general trigger is defined within the lifecycle for the entire CR Process. General triggers can be fired when a CR is submitted, transitioned, or transitioned.

Since:
4.7 06

Constructor Summary
GeneralEvent(User triggerUser, User adminUser, java.lang.String objectId, java.lang.String objectType, Attribute[] attributes, Attribute[] requestedAttributes)
           
 
Method Summary
 User getAdminUser()
          Gets the User object for the admin user.
 Attribute[] getAttributes()
          Gets an array of (Attributes that were modified during the submission, transition or attribute modification.
 java.lang.String getObjectId()
          Gets the object id (problem_number) of the object which caused the trigger to fire.
 java.lang.String getObjectType()
          Gets the type of object that this trigger is firing for.
 Attribute[] getRequestedAttributes()
          Gets an array of Attributes for all the attributes requested to be sent to the trigger.
 java.lang.String getTriggerType()
          Gets the type of this trigger, that is the type of action the spawned this trigger.
 User getTriggerUser()
          Gets the User object of the user which caused the trigger to fire.
 
Methods inherited from class com.telelogic.cs.api.TriggerEvent
fail, getFailure, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeneralEvent

public GeneralEvent(User triggerUser,
                    User adminUser,
                    java.lang.String objectId,
                    java.lang.String objectType,
                    Attribute[] attributes,
                    Attribute[] requestedAttributes)
Method Detail

getAttributes

public Attribute[] getAttributes()
Gets an array of (Attributes that were modified during the submission, transition or attribute modification.

Specified by:
getAttributes in interface CollectibleEvent
Returns:
An array of Attribute objects for the modified attributes.

getObjectId

public java.lang.String getObjectId()
Gets the object id (problem_number) of the object which caused the trigger to fire.

Specified by:
getObjectId in interface CollectibleEvent
Returns:
The id of the object.

getObjectType

public java.lang.String getObjectType()
Gets the type of object that this trigger is firing for. The only current valid value for this is CCM_PROBLEM.

Returns:
The type of object the trigger is firing on.

getRequestedAttributes

public Attribute[] getRequestedAttributes()
Gets an array of Attributes for all the attributes requested to be sent to the trigger. These are attributes that were specifically marked to be sent to all triggers in the lifecycle.

Specified by:
getRequestedAttributes in interface CollectibleEvent
Returns:
Array of all requested extra attributes.

getAdminUser

public User getAdminUser()
Gets the User object for the admin user. This is the admin user object from the same database as the user object.

Specified by:
getAdminUser in class TriggerEvent
Returns:
The admin user object for the database the user object was from.

getTriggerUser

public User getTriggerUser()
Gets the User object of the user which caused the trigger to fire.

Specified by:
getTriggerUser in class TriggerEvent
Returns:
The User object of the user which caused the trigger to fire.

getTriggerType

public java.lang.String getTriggerType()
Description copied from class: TriggerEvent
Gets the type of this trigger, that is the type of action the spawned this trigger. Can be used to determine what kind of trigger is firing if the same trigger script is reused for multiple trigger types.

Specified by:
getTriggerType in class TriggerEvent
Returns:
a name for the type of operation this trigger is for.


© Copyright IBM Corporation 2000, 2009
US Government Users Restricted Rights--Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Notices