com.ibm.openpages.api.trigger.events

## Class AbstractEvent

- java.lang.Object
- - com.ibm.openpages.api.trigger.events.AbstractEvent

- Direct Known Subclasses:
    AbstractResourceEvent, AbstractResourceOperationEvent, DeleteResourceEvent, QueryEvent, SearchEvent

      public class AbstractEvent
      extends java.lang.Object

  Base class for event. An event is a representation of the operations being performed by users in the OpenPages system that can be handled by triggers. An example event would be a "Create" of a new GRC object.

  Each unique class of trigger operations is represented by an event of a different `TriggerEventType` and the attributes and data for that event will differ depending on the context and arguments for the operation. For example the `TriggerEventType.CREATE_OBJECT` event for a GRC object will provide different information than a `TriggerEventType.DISASSOCIATE_OBJECTS` event for multiple GRC objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractEvent(TriggerEventType triggerEventType, TriggerPositionType position, Context context)` Default constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Context` | `getContext()` Provides access to the API context object.
    `TriggerPositionType` | `getPosition()` Returns type of the trigger position.
    `TriggerEventType` | `getTriggerEventType()` Returns type of the trigger event.
    `boolean` | `hasOuterCreateWithRelationsEvent()` Returns whether the event is triggered within the CreateWithRelationsResourceEvent.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractEvent

          public AbstractEvent(TriggerEventType triggerEventType,
                               TriggerPositionType position,
                               Context context)

      Default constructor
      Parameters:
        `triggerEventType` - one of the trigger event types
        `position` - either pre or post
        `context` - the Context for the API

  - ### Method Detail

    - #### getTriggerEventType

          public TriggerEventType getTriggerEventType()

      Returns type of the trigger event. Each operation is represented by an event.
      Returns:
        TriggerEventType

    - #### getContext

          public Context getContext()

      Provides access to the API context object.
      Returns:
        the API Context for the current operation

    - #### getPosition

          public TriggerPositionType getPosition()

      Returns type of the trigger position.
      Returns:
        TriggerPositionType

    - #### hasOuterCreateWithRelationsEvent

          public boolean hasOuterCreateWithRelationsEvent()

      Returns whether the event is triggered within the CreateWithRelationsResourceEvent. For the backward compatibility, you would get CreateResourceEvent and also AssociateResourceEvents within the CreateWithRelationsResourceEvent. You can use this API to determine if it is an inner event.
      Returns:
      Since:
        8.2

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.