com.ibm.openpages.api.trigger.oob

## Class FieldsMatchRule

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

-     public class FieldsMatchRule
      extends DefaultRule

  This GRC trigger rule checks if values of the operating object match specific values.
  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 |
  rule.field.nnn |  | The name of field to be compared. | Yes |
  rule.field.value.nnn |  | The value of field to be compared. For date data type, the format of value should be in MM/dd/yyyy, e.g. 12/31/2015. | Yes |
  rule.operator.nnn | = - equals to != - not equal to > - greater than >= - greater than or equals to < - less than <= - less than or equals to | The compared operator. | Yes |
  | check.for | all - Checks whether all fields are matched. any - Checks whether any one field is matched. | Determines the scope of the compare. 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 - Check on the source only. This applies to copy.object or copy.objects events only.

  Example usage in _trigger_config_.xml:
  `

         <rule class="com.ibm.openpages.api.trigger.oob.FieldsMatchRule" >
            <attribute name="content.type" value="SOXIssue"/>
            <attribute name="rule.field.1" value="OPSS-Iss:Additional Description"/>
            <attribute name="rule.field.value.1" value="Test"/>
            <attribute name="rule.operator.1" value="="/>
            <attribute name="rule.field.2" value="OPSS-Iss:Issue Type"/>
            <attribute name="rule.field.value.2" value="Scoping"/>
            <attribute name="rule.operator.2" value="="/>
            <attribute name="check.for" value="all"/>
        </rule>

  `

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldsMatchRule()`

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

    - #### FieldsMatchRule

          public FieldsMatchRule()

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