com.ibm.openpages.api.trigger.events

## Class DeleteResourceEvent

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

-     public class DeleteResourceEvent
      extends AbstractEvent

  Represents the event type for deleting one or more resource objects. Some operations delete a single resource while others delete a list of resources. The event provides the resource Ids for the resources being deleted and can be retrieved inside the rule or event handlers.

  See Also:
    `TriggerEventType.DELETE_OBJECTS`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeleteResourceEvent(Id resourceId, TriggerPositionType position, Context context)` Constructor for single resource Id
    `DeleteResourceEvent(java.util.List<Id> resourceIds, TriggerPositionType position, Context context)` Constructor for list of resource Ids

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Id` | `getResourceId()` Returns the single Id for the resource being deleted for this event.
    `java.util.List<Id>` | `getResourceIds()` Returns list of resource Ids being deleted.

    - ### Methods inherited from class com.ibm.openpages.api.trigger.events.AbstractEvent

      `getContext, getPosition, getTriggerEventType, hasOuterCreateWithRelationsEvent`

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

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

- - ### Constructor Detail

    - #### DeleteResourceEvent

          public DeleteResourceEvent(Id resourceId,
                                     TriggerPositionType position,
                                     Context context)

      Constructor for single resource Id
      Parameters:
        `resourceId` - Id of the resource being deleted
        `position` - either pre or post
        `context` - the Context for the API

    - #### DeleteResourceEvent

          public DeleteResourceEvent(java.util.List<Id> resourceIds,
                                     TriggerPositionType position,
                                     Context context)

      Constructor for list of resource Ids
      Parameters:
        `resourceIds` - Ids of the resources being deleted
        `position` - either pre or post
        `context` - the Context for the API

  - ### Method Detail

    - #### getResourceId

          public Id getResourceId()

      Returns the single Id for the resource being deleted for this event. If more than one resources are being deleted, then this will return the first Id from the list of resources.
      Returns:
        the resource Id for the resource being deleted, or in case there are multiple resources to be deleted, the first Id from the list

    - #### getResourceIds

          public java.util.List<Id> getResourceIds()

      Returns list of resource Ids being deleted. If a single resource is being deleted the list will contain the one Id for that resource.
      Returns:
        List of Ids for the resources to be deleted for this event

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.