com.telelogic.cs.api

Class TriggerEvent

  • java.lang.Object
    • com.telelogic.cs.api.TriggerEvent
    • Constructor Summary

      Constructors 
      Constructor and Description
      TriggerEvent() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void fail(java.lang.String errorMessage)
      Indicates that the current trigger has failed.
      abstract User getAdminUser()
      Gets information about the admin user for the database the trigger fired in.
      java.lang.String getFailure()
      Gets the failure message is fail was called.
      abstract java.lang.String getTriggerType()
      Gets the type of this trigger, that is the type of action the spawned this trigger.
      abstract User getTriggerUser()
      Gets information about this user that performed the action that fired this trigger.
      abstract boolean isPostTrigger()
      Gets if this trigger is a post-trigger or not, true if a post-trigger false otherwise.
      abstract boolean isPreTrigger()
      Gets if this trigger is a pre-trigger or not, true if a pre-trigger false otherwise.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • TriggerEvent

        public TriggerEvent()
    • Method Detail

      • getTriggerType

        public abstract java.lang.String getTriggerType()
        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.
        Returns:
        a name for the type of operation this trigger is for.
      • getTriggerUser

        public abstract User getTriggerUser()
        Gets information about this user that performed the action that fired this trigger.
        Returns:
        details about the trigger user.
      • getAdminUser

        public abstract User getAdminUser()
        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.
        Returns:
        details about the admin user.
      • fail

        public void fail(java.lang.String errorMessage)
        Indicates that the current trigger has failed. This may prevent the current operation from proceeding (depending on whether this is a pre or post trigger) and will likely display the error message in the interface or send it to the log.

        Calling this method indicates the something bad has happened and can be used in any trigger. If you are writing a pre-transition trigger and simply want to gracefully indicate that the transition should not proceed, instead call stopTransition.

        Parameters:
        errorMessage - an error message for an end user indicating why this trigger failed. May be shown in the interface or be sent to the log file.
      • getFailure

        public java.lang.String getFailure()
        Gets the failure message is fail was called.
        Returns:
        the failure message, or null if fail was never called.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isPreTrigger

        public abstract boolean isPreTrigger()
        Gets if this trigger is a pre-trigger or not, true if a pre-trigger false otherwise.
        Returns:
        True if a pre-trigger, false otherwise.
      • isPostTrigger

        public abstract boolean isPostTrigger()
        Gets if this trigger is a post-trigger or not, true if a post-trigger false otherwise.
        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