com.ibm.openpages.api.trigger.oob

## Class ContentTypeMatchRule

- java.lang.Object
- - com.ibm.openpages.api.trigger.AbstractRule
  - - com.ibm.openpages.api.trigger.ext.DefaultRule
    - - com.ibm.openpages.api.trigger.oob.ContentTypeMatchRule

-     public class ContentTypeMatchRule
      extends DefaultRule

  This GRC trigger rule checks if the object type of the operating object matches the specific value.
  Usage: This rule can be used for following events:
  create.object
  create.object.with.relations
  update.object
  delete.objects
  associate.objects
  disassociate.objects
  reassign.primary.parent
  rename.object
  rename.objects
  copy.object
  copy.objects
  move.object
  move.objects
  This rule can be executed in the PRE or POST position, but the rule must be executed only in the PRE position for delete.objects event.
  Attributes:

  Attribute | Values | Description | Required | Default
  --- | --- | --- | --- | ---
  content.type |  | The object type name of the object. E.g. <attribute name="content.type" value="SOXIssue"/> | Yes |
  check.on | parent - Check on the parent only. This applies to associate.objects, disassociate.objects or reassign.primary.parent events only. child - Check on the child only. This applies to associate.objects, disassociate.objects or reassign.primary.parent events only. source - Check on the source only. This applies to copy, move or rename events only. destination - Check on the destination only. This applies to copy, move or rename events only. | Determines the scope of the search. E.g. . This applies to associate.objects, disassociate.objects, reassign.primary.parent, copy, move or rename events only. | No | parent - This applies to associate.objects, disassociate.objects or reassign.primary.parent events only. source - Check on the source only. This applies to copy, move or rename events only.

  Example usage in _trigger_config_.xml:
  `

         <rule class="com.ibm.openpages.api.trigger.oob.ContentTypeMatchRule" >
            <attribute name="content.type" value="LossEvent"/>
         </rule>

  `

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContentTypeMatchRule()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isApplicable(AssociateResourceEvent event)` Check if the associate resource event should be applied.
    `boolean` | `isApplicable(CopyResourceEvent event)` Check if the copy resource event should be applied.
    `boolean` | `isApplicable(CreateResourceEvent event)` Check if the create resource event should be applied.
    `boolean` | `isApplicable(CreateResourceWithRelationsEvent event)` Check if the create resource with relations event should be applied.
    `boolean` | `isApplicable(DeleteResourceEvent event)` Check if the delete resource event should be applied.
    `boolean` | `isApplicable(DisassociateResourceEvent event)` Check if the disassociate resource event should be applied.
    `boolean` | `isApplicable(MoveResourceEvent event)` Check if the move resource event should be applied.
    `boolean` | `isApplicable(ReassignPrimaryParentEvent event)` Check if the reassign primary parent event should be applied.
    `boolean` | `isApplicable(RenameResourceEvent event)` Check if the rename resource event should be applied.
    `boolean` | `isApplicable(UpdateResourceEvent event)` Check if the update resource event should be applied.

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

      `isApplicable, isApplicable, isApplicable`

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

      `getAttributes, setAttributes`

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

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

- - ### Constructor Detail

    - #### ContentTypeMatchRule

          public ContentTypeMatchRule()

  - ### Method Detail

    - #### isApplicable

          public boolean isApplicable(CreateResourceEvent event)

      Check if the create resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a create resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(UpdateResourceEvent event)

      Check if the update resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - an update resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(AssociateResourceEvent event)

      Check if the associate resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - an associate resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(DisassociateResourceEvent event)

      Check if the disassociate resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a dissasociate resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(CopyResourceEvent event)

      Check if the copy resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a copy resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(DeleteResourceEvent event)

      Check if the delete resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a delete resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(CreateResourceWithRelationsEvent event)

      Check if the create resource with relations event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a create resource with relations event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(ReassignPrimaryParentEvent event)

      Check if the reassign primary parent event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a reassign primary parent event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(MoveResourceEvent event)

      Check if the move resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a move resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

    - #### isApplicable

          public boolean isApplicable(RenameResourceEvent event)

      Check if the rename resource event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a rename resource event to be checked.
      Returns:
        true if the event should be applied, otherwise return false.

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.