com.ibm.openpages.api.trigger.oob

## Class SetCurrentDateHandler

- java.lang.Object
- - com.ibm.openpages.api.trigger.AbstractEventHandler
  - - com.ibm.openpages.api.trigger.ext.DefaultEventHandler
    - - com.ibm.openpages.api.trigger.oob.SetCurrentDateHandler

-     public class SetCurrentDateHandler
      extends DefaultEventHandler

  This GRC trigger event handler sets the value of a date field to the current date.
  Usage: This event handler can be used for following events:
  create.object
  create.object.with.relations
  update.object
  This event handler must be executed only in the PRE position.
  Attributes:

  Attribute | Values | Description | Required | Default
  --- | --- | --- | --- | ---
  current.date.field |  | The field name of a date field | Yes |

  The format of a field name should be [FieldGroup]:[FieldName], for example: 'OPSS-Iss:Due Date'.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SetCurrentDateHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `handleEvent(CreateResourceEvent event)` Handles create resource event.
    `boolean` | `handleEvent(CreateResourceWithRelationsEvent event)` Handles create resource with relations event.
    `boolean` | `handleEvent(UpdateResourceEvent event)` Handles update resource event.

    - ### Methods inherited from class com.ibm.openpages.api.trigger.ext.DefaultEventHandler

      `handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent`

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

      `getAttributes, getRuleAttributes, setAttributes, setRuleAttributes, throwException`

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

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

- - ### Constructor Detail

    - #### SetCurrentDateHandler

          public SetCurrentDateHandler()

  - ### Method Detail

    - #### handleEvent

          public boolean handleEvent(CreateResourceEvent event)

      Handles create resource event.
      Overrides:
        `handleEvent` in class `DefaultEventHandler`
      Parameters:
        `event` - a create resource event to be handled
      Returns:
        true.

    - #### handleEvent

          public boolean handleEvent(CreateResourceWithRelationsEvent event)

      Handles create resource with relations event.
      Overrides:
        `handleEvent` in class `DefaultEventHandler`
      Parameters:
        `event` - a create resource with relations event to be handled
      Returns:
        true.

    - #### handleEvent

          public boolean handleEvent(UpdateResourceEvent event)

      Handles update resource event.
      Overrides:
        `handleEvent` in class `DefaultEventHandler`
      Parameters:
        `event` - an update resource event to be handled
      Returns:
        true.

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