com.ibm.openpages.api.trigger.events

## Class UpdateResourceEvent

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

-     public class UpdateResourceEvent
      extends AbstractResourceEvent

  Represents the event type for updating a resource object. The resource being updated is provided by `AbstractResourceEvent.getResource()`.

  For an event handler which handles the UpdateResourceEvent, the values of the resource object being saved can be modified directly. A separate call to IResourceService.saveResource() is not required.

  See Also:
    `TriggerEventType.UPDATE_OBJECT`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpdateResourceEvent(IResource resource, TriggerPositionType position, Context context)` Constructor with the resource to be created.
    `UpdateResourceEvent(TriggerPositionType position, Context context)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IResource` | `getUpdatedResource()` If available, as in during a POST event, it returns the updated resource object that resulted from this update event.

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

      `getResource`

    - ### 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

    - #### UpdateResourceEvent

          public UpdateResourceEvent(TriggerPositionType position,
                                     Context context)

      Default constructor.
      Parameters:
        `position` - either pre or post
        `context` - the Context for the API

    - #### UpdateResourceEvent

          public UpdateResourceEvent(IResource resource,
                                     TriggerPositionType position,
                                     Context context)

      Constructor with the resource to be created.
      Parameters:
        `resource` - the folder or OpenPages GRC object that is the focus of the event
        `position` - either pre or post
        `context` - the context for the API

  - ### Method Detail

    - #### getUpdatedResource

          public IResource getUpdatedResource()

      If available, as in during a POST event, it returns the updated resource object that resulted from this update event.
      Returns:
        updated resource if available, or null

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.