com.telelogic.cs.api

Class RelationEvent



  • public class RelationEvent
    extends TriggerEvent
    Sent when a relation is created or deleted.

    A relation trigger is defined within the Change lifecycle on individual CCM_RELATION attributes. Relation triggers can be fired when a relationship is created or removed.

    Since:
    4.7 06
    • Constructor Summary

      Constructors 
      Constructor and Description
      RelationEvent(User triggerUser, User adminUser, java.lang.String name, java.lang.String type, java.lang.String fromObject, java.lang.String toObject, boolean isCreate, boolean isPreTrigger) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      User getAdminUser()
      Gets the User object for the admin user.
      java.lang.String getFromObjectId()
      Gets the id (CR - problem_number / Task - task_number / Object - cvid) of the object the relation is coming from.
      java.lang.String getName()
      Gets the name of the relation which caused this trigger to fire (i.e: duplicate).
      java.lang.String getReleationCreationStoppedMessage()
      Get the relation creation stop message
      java.lang.String getReleationDeletionStoppedMessage()
      Get the relation deletion stop message
      java.lang.String getToObjectId()
      Gets the id (CR - problem_number / Task - task_number / Object - cvid) of the object the relation is going to.
      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.
      java.lang.String getType()
      Gets the type of relation the trigger is firing on.
      boolean isCreate()
      Is this relation trigger firing on behalf of a create operation or not.
      boolean isPostTrigger()
      Gets if this trigger is a post-trigger or not, true if a post-trigger false otherwise.
      boolean isPreTrigger()
      Gets if this trigger is a pre-trigger or not, true if a pre-trigger false otherwise.
      boolean isReleationCreationStopped()
      Checks if relation creation stopped.
      boolean isReleationDeletionStopped()
      Checks if relation creation stopped.
      void stopReletionCreation(java.lang.String message)
      Invoked by triggers to stop the relation creation.
      void stopReletionDeletion(java.lang.String message)
      Invoked by triggers to stop the relation deletion.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RelationEvent

        public RelationEvent(User triggerUser,
                             User adminUser,
                             java.lang.String name,
                             java.lang.String type,
                             java.lang.String fromObject,
                             java.lang.String toObject,
                             boolean isCreate,
                             boolean isPreTrigger)
    • Method Detail

      • getFromObjectId

        public java.lang.String getFromObjectId()
        Gets the id (CR - problem_number / Task - task_number / Object - cvid) of the object the relation is coming from.
        Returns:
        The id of the object the relation is coming from.
      • getName

        public java.lang.String getName()
        Gets the name of the relation which caused this trigger to fire (i.e: duplicate).
        Returns:
        The relation name.
      • getToObjectId

        public java.lang.String getToObjectId()
        Gets the id (CR - problem_number / Task - task_number / Object - cvid) of the object the relation is going to.
        Returns:
        The id of the object the relation is going to.
      • getType

        public java.lang.String getType()
        Gets the type of relation the trigger is firing on.
         Relation types:
         CCM_PROBLEM_PROBLEM: A problem -- problem relationship.
         CCM_PROBLEM_TASK:    A problem -- task relationship.
         CCM_PROBLEM_OBJECT:  A problem -- object relationship.
         
         CCM_TASK_PROBLEM:    A task    -- problem relationship.
         CCM_TASK_TASK:       A task    -- task relationship.
         CCM_TASK_OBJECT:     A task    -- object relationship.
         
         CCM_OBJECT_PROBLEM:  A object  -- problem relationship.
         CCM_OBJECT_TASK:     A object  -- task relationship.
         CCM_OBJECT_OBJECT:   A object  -- object relationship.
         
        Returns:
        The name of the relation type.
      • isCreate

        public boolean isCreate()
        Is this relation trigger firing on behalf of a create operation or not. True if a relation is being created and false if a relation is being deleted.
        Returns:
        If the trigger is firing for a create relation.
      • 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.
      • stopReletionCreation

        public void stopReletionCreation(java.lang.String message)
        Invoked by triggers to stop the relation creation.
        Parameters:
        message -
      • stopReletionDeletion

        public void stopReletionDeletion(java.lang.String message)
        Invoked by triggers to stop the relation deletion.
        Parameters:
        message -
      • isReleationCreationStopped

        public boolean isReleationCreationStopped()
        Checks if relation creation stopped.
        Returns:
        true|false
      • isReleationDeletionStopped

        public boolean isReleationDeletionStopped()
        Checks if relation creation stopped.
        Returns:
        true|false
      • getReleationCreationStoppedMessage

        public java.lang.String getReleationCreationStoppedMessage()
        Get the relation creation stop message
        Returns:
        message
      • getReleationDeletionStoppedMessage

        public java.lang.String getReleationDeletionStoppedMessage()
        Get the relation deletion stop message
        Returns:
        message
      • isPreTrigger

        public boolean isPreTrigger()
        Description copied from class: TriggerEvent
        Gets if this trigger is a pre-trigger or not, true if a pre-trigger false otherwise.
        Specified by:
        isPreTrigger in class TriggerEvent
        Returns:
        True if a pre-trigger, false otherwise.
      • isPostTrigger

        public boolean isPostTrigger()
        Description copied from class: TriggerEvent
        Gets if this trigger is a post-trigger or not, true if a post-trigger false otherwise.
        Specified by:
        isPostTrigger in class TriggerEvent
        Returns:
        True if a post-trigger, false otherwise.

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