com.ibm.openpages.api.trigger.oob

## Class FolderMatchRule

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

-     public class FolderMatchRule
      extends DefaultRule

  This GRC trigger rule checks if the folder path 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
  --- | --- | --- | --- | ---
  folder.path |  | Determines the path of the folder in which the resource should reside. | Yes |
  scope | recursive - Sub-folders will be checked. self - Only immediate child resources will be checked. | The scope of the search. | No | self
  check.for | all - All fields will be checked for changes. any - Checks whether any one field was changed. | Determines the scope of the search. E.g. <attribute name="check.for" value="all"/> | No | all
  check.on | parent - Check on the parent only. This applies to associate.objects or disassociate.objects events only. child - Check on the child only. This applies to associate.objects or disassociate.objects events only. source - Check on the source only. This applies to copy.object or copy.objects events only. destination - Check on the destination only. This applies to copy.object or copy.objects events only. | Determines the scope of the search. E.g. . This applies to associate.objects, disassociate.objects, copy.object or copy.objects events only. | No | parent - This applies to associate.objects or disassociate.objects events only. source - This applies to copy.object or copy.objects events only.

  Example usage in _trigger_config_.xml:
  `

         <rule class="com.ibm.openpages.api.trigger.oob.FolderMatchRule" >
            <attribute name="folder.path" value="/_op_sox/Project/Default/ICDocumentation/Loss Events"/>
            <attribute name="scope" value="recursive"/>
        </rule>

  `

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FolderMatchRule()`

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

    - #### FolderMatchRule

          public FolderMatchRule()

  - ### 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(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(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(ReassignPrimaryParentEvent event)

      Check if the reassigning primary parent event should be applied.
      Overrides:
        `isApplicable` in class `DefaultRule`
      Parameters:
        `event` - a reassigning primary parent 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.

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

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.