com.ibm.openpages.api.trigger.events

## Class GRCTriggerEventFactory

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

-     public class GRCTriggerEventFactory
      extends java.lang.Object

  Utility class which creates instances of Events based on the TriggerEventType, Position and other method/operation specific parameters. If the wrong method is called for the TriggerEventType a null Event is returned.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractEvent` | `createEvent(TriggerEventType eventType, Id sourceId, Id targetId, java.lang.String destinationName, CopyOptions copyOptions, TriggerPositionType position, Context context, java.lang.Object returnedObject)` Creates a new event for the event type, Resource Ids, destination name, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, Id sourceId, Id targetId, java.lang.String newName, MoveObjectOptions options, TriggerPositionType position, Context context)` Creates a new event for the event type, resource(s), position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, Id sourceId, Id targetId, TriggerPositionType position, Context context)` Creates a new event for the event type, Resource Ids, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, Id parentGrcObjectId, java.util.List<Id> childGrcObjectIds, TriggerPositionType position, Context context)` Creates a new event for the event type, resource(s), position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, Id id, TriggerPositionType position, Context context)` Creates a new event for the event type, Resource Id, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, IResource resource, IResource retResource, TriggerPositionType position, Context context)` Creates a new event for the event type, resource(s), position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, IResource resource, IResource retResource, TriggerPositionType position, Context context, Id[] additionalParents, Id[] children)` Creates a new event for the event type, resource(s), position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, IResource resource, TriggerPositionType position, Context context)` Creates a new event for the event type, resource, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, IResource resource, TriggerPositionType position, Context context, Id[] additionalParents, Id[] children)` Creates a new event for the event type, resource, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, java.util.List<Id> parentIds, Id childId, TriggerPositionType position, Context context)` Creates a new event for the event type, Resource Ids, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, java.util.List<Id> ids, TriggerPositionType position, Context context)` Creates a new event for the event type, Resource Ids, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, java.lang.String query, int startIndex, com.ibm.openpages.service.query.QueryOptions options, TriggerPositionType position, Context context)` Creates a new event for the event type, query string, query options, position and context.
    `AbstractEvent` | `createEvent(TriggerEventType eventType, TriggerPositionType position, Context context, java.lang.Object[] args)` Creates a new event for the event type, position and context.
    `static GRCTriggerEventFactory` | `getFactory()` Returns new instance of GRCTriggerEventFactory

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

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

- - ### Method Detail

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           IResource resource,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, resource, position and context. This supports `TriggerEventType.CREATE_OBJECT` and `TriggerEventType.UPDATE_OBJECT` event types.
      Parameters:
        `eventType` - CREATE_OBJECT or UPDATE_OBJECT event types
        `resource` - IResource being created or updated in the event
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        CreateResourceEvent for CREATE_OBJECT or UpdateResourceEvent for UPDATE_OBJECT else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           IResource resource,
                                           TriggerPositionType position,
                                           Context context,
                                           Id[] additionalParents,
                                           Id[] children)

      Creates a new event for the event type, resource, position and context. This supports `TriggerEventType.CREATE_OBJECT`, `TriggerEventType.CREATE_OBJECT_W_RELATIONS` and `TriggerEventType.UPDATE_OBJECT` event types.
      Parameters:
        `eventType` - CREATE_OBJECT or UPDATE_OBJECT event types
        `resource` - IResource being created or updated in the event
        `position` - either pre or post
        `context` - the Context for the API
        `additionalParents` -
        `children` -
      Returns:

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           Id id,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, Resource Id, position and context. This supports `TriggerEventType.DELETE_OBJECTS` event type.
      Parameters:
        `eventType` - DELETE_OBJECTS event type
        `id` - Id of single resource being deleted
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        DeleteResourceEvent for DELETE_OBJECTS else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           java.util.List<Id> ids,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, Resource Ids, position and context. This supports `TriggerEventType.DELETE_OBJECTS` event types.
      Parameters:
        `eventType` - DELETE_OBJECTS event type
        `ids` - Ids of resources being deleted
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        DeleteResourceEvent for DELETE_OBJECTS else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           java.util.List<Id> parentIds,
                                           Id childId,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, Resource Ids, position and context. This supports `TriggerEventType.ASSOCIATE_OBJECTS` and `TriggerEventType.DISASSOCIATE_OBJECTS` event types.
      Parameters:
        `eventType` - ASSOCIATE_OBJECTS or DISASSOCIATE_OBJECTS event types
        `parentIds` - List of multiple parent Ids
        `childId` - single child Id
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        AssociateResourceEvent for ASSOCIATE_OBJECTS or DisassociateResourceEvent for DISASSOCIATE_OBJECTS else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           Id sourceId,
                                           Id targetId,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, Resource Ids, position and context. This supports `TriggerEventType.COPY_OBJECT` event type. This copy will be a folder copy event.
      Parameters:
        `eventType` - COPY_OBJECT event type
        `sourceId` - Id of resource being copied
        `targetId` - Id of folder the source resource is being copied to
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        CopyResourceEvent for COPY_OBJECT or null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           Id sourceId,
                                           Id targetId,
                                           java.lang.String destinationName,
                                           CopyOptions copyOptions,
                                           TriggerPositionType position,
                                           Context context,
                                           java.lang.Object returnedObject)

      Creates a new event for the event type, Resource Ids, destination name, position and context. This supports `TriggerEventType.COPY_OBJECTS` event types.
      Parameters:
        `eventType` - COPY_OBJECTS event type
        `sourceId` - Id of resource being copied
        `targetId` - Id of parent GRC Object the source resource is being copied to
        `destinationName` - new name for copied resource
        `copyOptions` - options for copied resource
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        CopyResourceEvent for COPY_OBJECTS or null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           java.lang.String query,
                                           int startIndex,
                                           com.ibm.openpages.service.query.QueryOptions options,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, query string, query options, position and context. This supports `TriggerEventType.QUERY_OBJECTS` event type.
      Parameters:
        `eventType` - QUERY_OBJECTS event type
        `query` - SQL query
        `startIndex` - starting row index
        `options` - query options
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        QueryEvent for QUERY_OBJECTS or null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           TriggerPositionType position,
                                           Context context,
                                           java.lang.Object[] args)

      Creates a new event for the event type, position and context. This supports `TriggerEventType.SEARCH_OBJECTS` event types.
      Parameters:
        `eventType` - SEARCH_OBJECTS event type
        `position` - either pre or post
        `context` - the Context for the API
        `args` - the actual parameters for SDK search method
      Returns:
        SearchEvent for SEARCH_OBJECTS or null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           IResource resource,
                                           IResource retResource,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, resource(s), position and context. This supports `TriggerEventType.CREATE_OBJECT` and `TriggerEventType.UPDATE_OBJECT` event types.
      Parameters:
        `eventType` - CREATE_OBJECT or UPDATE_OBJECT event types
        `resource` - IResource being created or updated in the event
        `retResource` - IResource returned by the create operation or the update operation in POST position
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        CreateResourceEvent for CREATE_OBJECT or UpdateResourceEvent for UPDATE_OBJECT else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           IResource resource,
                                           IResource retResource,
                                           TriggerPositionType position,
                                           Context context,
                                           Id[] additionalParents,
                                           Id[] children)

      Creates a new event for the event type, resource(s), position and context. This supports `TriggerEventType.CREATE_OBJECT`, `TriggerEventType.CREATE_OBJECT_W_RELATIONS` and `TriggerEventType.UPDATE_OBJECT` event types.
      Parameters:
        `eventType` - CREATE_OBJECT or UPDATE_OBJECT event types
        `resource` - IResource being created or updated in the event
        `retResource` - IResource returned by the create operation or the update operation in POST position
        `position` - either pre or post
        `context` - the Context for the API
        `additionalParents` -
        `children` -
      Returns:

    - #### getFactory

          public static GRCTriggerEventFactory getFactory()

      Returns new instance of GRCTriggerEventFactory
      Returns:
        instance of GRCTriggerEventFactory

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           Id parentGrcObjectId,
                                           java.util.List<Id> childGrcObjectIds,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, resource(s), position and context. This supports `TriggerEventType.ASSOCIATE_OBJECTS` and `TriggerEventType.DISASSOCIATE_OBJECTS` event types.
      Parameters:
        `eventType` - ASSOCIATE_OBJECTS or DISASSOCIATE_OBJECTS event types
        `parentGrcObjectId` - single parent Id
        `childGrcObjectIds` - List of multiple children Ids
        `position` - either pre or post
        `context` - the Context for the API
      Returns:
        AssociateResourceEvent for ASSOCIATE_OBJECTS or DisassociateResourceEvent for DISASSOCIATE_OBJECTS else null

    - #### createEvent

          public AbstractEvent createEvent(TriggerEventType eventType,
                                           Id sourceId,
                                           Id targetId,
                                           java.lang.String newName,
                                           MoveObjectOptions options,
                                           TriggerPositionType position,
                                           Context context)

      Creates a new event for the event type, resource(s), position and context. This supports `TriggerEventType.MOVE_OBJECT`, `TriggerEventType.MOVE_OBJECTS`, `TriggerEventType.RENAME_OBJECT`, and `TriggerEventType.RENAME_OBJECTS` event types.
      Parameters:
        `eventType` - ASSOCIATE_OBJECTS or DISASSOCIATE_OBJECTS event types
        `sourceId` - source object Id
        `targetId` - target object Id
        `newName` - new destination name
        `options` - move options
        `position` - either pre or post
        `context` - the Context for the API
      Returns:

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.