com.ibm.openpages.api.trigger.oob.lifecycle

## Class DefaultLifecycleEventHandler

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

-     public class DefaultLifecycleEventHandler
      extends DefaultEventHandler

  Handle Lifecycle transition processing depending on attributes specified in the Lifecycle trigger XML Format of field name is [FieldGroup]:[FieldName] using the system names for the field. Format of Enum value is the system name for the drop down value.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CONDITIONS_EQUAL_ERROR`
    `static int` | `CONDITIONS_ERROR`
    `static int` | `CONDITIONS_NOT_EQUAL_ERROR`
    `static int` | `GREATER_THAN_ERROR`
    `static int` | `INVALID_VALUE`
    `static int` | `INVALID_VALUE_DATE`
    `static int` | `KEY_NOT_FOUND_ERROR`
    `static int` | `LESS_THAN_ERROR`
    `static int` | `PROPERTY_REQUIRED`
    `static int` | `SHOULDBE_GREATER_THAN_ERROR`
    `static int` | `SHOULDBE_LESS_THAN_ERROR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLifecycleEventHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getFieldGroup()`
    `IField` | `getLifecycleAssigneeField(IGRCObject object)`
    `java.lang.String` | `getLifecycleAssigneeFieldName()`
    `java.lang.String` | `getLifecycleNameFieldName()`
    `java.lang.String` | `getLifecycleStageFieldName()`
    `java.lang.String` | `getLifecycleStatusFieldName()`
    `java.lang.String` | `getLifecycleTransitionFieldName()`
    `java.lang.String` | `getLifecycleUpdateAssigneeFieldName()`
    `java.lang.String` | `getTransitionAttribute(IGRCObject object, java.lang.String attrKey)`
    `java.lang.String` | `getTransitionAttribute(IGRCObject object, java.lang.String attrKey, boolean useDefault)`
    `java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>>` | `getTransitionsAttributes()`
    `boolean` | `handleEvent(CreateResourceEvent event)` HandleEvent() method for CreateResourceEvent type.
    `boolean` | `handleEvent(UpdateResourceEvent event)` HandleEvent() method for UpdateResourceEvent type.
    `boolean` | `isInvalidValue(java.lang.String value)`
    `void` | `setAssignee(IGRCObject object, java.lang.String assigneeValue)`
    `void` | `setErrorMessage()`
    `void` | `setTransitionsAttributes(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> transitionsAttributes)`
    `void` | `throwLifecycleException(java.lang.String error)`

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

      `handleEvent, 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`

- - ### Field Detail

    - #### CONDITIONS_ERROR

          public static final int CONDITIONS_ERROR

      See Also:
        Constant Field Values

    - #### CONDITIONS_EQUAL_ERROR

          public static final int CONDITIONS_EQUAL_ERROR

      See Also:
        Constant Field Values

    - #### CONDITIONS_NOT_EQUAL_ERROR

          public static final int CONDITIONS_NOT_EQUAL_ERROR

      See Also:
        Constant Field Values

    - #### PROPERTY_REQUIRED

          public static final int PROPERTY_REQUIRED

      See Also:
        Constant Field Values

    - #### INVALID_VALUE

          public static final int INVALID_VALUE

      See Also:
        Constant Field Values

    - #### INVALID_VALUE_DATE

          public static final int INVALID_VALUE_DATE

      See Also:
        Constant Field Values

    - #### SHOULDBE_LESS_THAN_ERROR

          public static final int SHOULDBE_LESS_THAN_ERROR

      See Also:
        Constant Field Values

    - #### SHOULDBE_GREATER_THAN_ERROR

          public static final int SHOULDBE_GREATER_THAN_ERROR

      See Also:
        Constant Field Values

    - #### LESS_THAN_ERROR

          public static final int LESS_THAN_ERROR

      See Also:
        Constant Field Values

    - #### GREATER_THAN_ERROR

          public static final int GREATER_THAN_ERROR

      See Also:
        Constant Field Values

    - #### KEY_NOT_FOUND_ERROR

          public static final int KEY_NOT_FOUND_ERROR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultLifecycleEventHandler

          public DefaultLifecycleEventHandler()

  - ### Method Detail

    - #### getTransitionsAttributes

          public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getTransitionsAttributes()

    - #### setTransitionsAttributes

          public void setTransitionsAttributes(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> transitionsAttributes)

    - #### handleEvent

          public boolean handleEvent(CreateResourceEvent event)

      Description copied from class: `DefaultEventHandler`
      HandleEvent() method for CreateResourceEvent type. The DefaultEventHandler always returns false. Override this handleEvent() methods if CreateResourceEvent type is associated with the trigger rule. In a create event handler, the values of the object being saved is modified. Calling IResourceService.saveResource() is not required for `TriggerPositionType.PRE`.
      Overrides:
        `handleEvent` in class `DefaultEventHandler`
      Parameters:
        `event` - a create resource event to be handled

    - #### handleEvent

          public boolean handleEvent(UpdateResourceEvent event)

      Description copied from class: `DefaultEventHandler`
      HandleEvent() method for UpdateResourceEvent type. The DefaultEventHandler always returns false. Override this handleEvent() methods if UpdateResourceEvent type is associated with the trigger rule. In an update event handler, the values of the object being saved is modified. Calling IResourceService.saveResource() is not required.
      Overrides:
        `handleEvent` in class `DefaultEventHandler`
      Parameters:
        `event` - an update resource event to be handled

    - #### getFieldGroup

          public java.lang.String getFieldGroup()

    - #### getLifecycleAssigneeFieldName

          public java.lang.String getLifecycleAssigneeFieldName()

    - #### getLifecycleUpdateAssigneeFieldName

          public java.lang.String getLifecycleUpdateAssigneeFieldName()

    - #### getLifecycleStageFieldName

          public java.lang.String getLifecycleStageFieldName()

    - #### getLifecycleTransitionFieldName

          public java.lang.String getLifecycleTransitionFieldName()

    - #### getLifecycleStatusFieldName

          public java.lang.String getLifecycleStatusFieldName()

    - #### getLifecycleNameFieldName

          public java.lang.String getLifecycleNameFieldName()

    - #### setAssignee

          public void setAssignee(IGRCObject object,
                                  java.lang.String assigneeValue)

    - #### getLifecycleAssigneeField

          public IField getLifecycleAssigneeField(IGRCObject object)

    - #### getTransitionAttribute

          public java.lang.String getTransitionAttribute(IGRCObject object,
                                                         java.lang.String attrKey)

    - #### getTransitionAttribute

          public java.lang.String getTransitionAttribute(IGRCObject object,
                                                         java.lang.String attrKey,
                                                         boolean useDefault)

    - #### isInvalidValue

          public boolean isInvalidValue(java.lang.String value)

    - #### setErrorMessage

          public void setErrorMessage()

    - #### throwLifecycleException

          public void throwLifecycleException(java.lang.String error)
                                       throws GRCTriggerException

      Throws:
        `GRCTriggerException`

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