com.telelogic.cs.api
Class AttributeEvent

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

public class AttributeEvent
extends TriggerEvent
implements CollectibleEvent

Sent when an attribute is modified.

An attribute trigger is defined within the lifecycle on individual attributes. Attribute triggers can be fired when an attribute is modified and when the attribute is modified during a submission or transition.

Since:
4.7 06

Constructor Summary
AttributeEvent(User triggerUser, User adminUser, java.lang.String objectId, java.lang.String objectType, Attribute attribute, Attribute[] requestedAttributes)
           
 
Method Summary
 User getAdminUser()
          Gets information about the admin user for the database the trigger fired in.
 Attribute getAttribute()
          Gets a single Attribute that represents the attribute which caused the AttributeTrigger to fire.
 Attribute[] getAttributes()
          Same as getAttribute, but wraps the attribute as in array.
 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 information about this user that performed the action that fired this trigger.
 
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

AttributeEvent

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

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.

getAttribute

public Attribute getAttribute()
Gets a single Attribute that represents the attribute which caused the AttributeTrigger to fire.

Returns:
The attribute details for the attribute which caused the trigger to fire.

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()
Description copied from class: TriggerEvent
Gets information about the admin user for the database the trigger fired in. Can be used in triggers to perform operations as an admin when triggers should run without security restrictions.

Specified by:
getAdminUser in class TriggerEvent
Returns:
details about the admin user.

getTriggerUser

public User getTriggerUser()
Description copied from class: TriggerEvent
Gets information about this user that performed the action that fired this trigger.

Specified by:
getTriggerUser in class TriggerEvent
Returns:
details about the trigger user.

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.

getAttributes

public Attribute[] getAttributes()
Same as getAttribute, but wraps the attribute as in array. Satisfies the CollectibleEvent interface.

Specified by:
getAttributes in interface CollectibleEvent
Returns:
the attribute wrapped as an array.


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