Class RuleValidationCriteria

java.lang.Object
com.ptc.core.businessRules.validation.RuleValidationCriteria
All Implemented Interfaces:
Serializable

public class RuleValidationCriteria extends Object implements Serializable
The RuleValidationCriteria contains information that is used by all business rules within a business rule set.

Supported API: true

Extendable: false
See Also:
  • Constructor Details

    • RuleValidationCriteria

      public RuleValidationCriteria(WTCollection seedObjects, WTContainerRef containerRef)
      Creates a new RuleValidationCriteria. Defaults to setting the seed objects to the role B object when the given seed objects are links.
      Parameters:
      seedObjects -
      containerRef -
      See Also:
    • RuleValidationCriteria

      public RuleValidationCriteria(WTCollection seedObjects, WTContainerRef containerRef, boolean useRoleB)
      Creates a new RuleValidationCriteria. When the collection of seed objects has one or more links the useRoleB parameter will be used to determine which object role on the link should be used to populate the collection of target objects.

      Supported API: true
      Parameters:
      seedObjects -
      containerRef -
      useRoleB - When true adds the role B of target link as a target object
  • Method Details

    • getTargetObjects

      public WTCollection getTargetObjects()
      Will return the target objects. The target object collection does not contain any link objects. If a seed object was a link the role object is added to the target collection.

      Supported API: true
      Returns:
      target objects
    • getTargetLinkObjects

      public WTCollection getTargetLinkObjects()
      Will return only target objects that are links. If the seed object was not a link it is not included in the collection of target links. If none of the seed objects was a link then an empty collection of target links is returned.

      Supported API: true
      Returns:
      the target link objects
    • getContainerRef

      public WTContainerRef getContainerRef()
      The container object for validation.

      Supported API: true
      Returns:
    • isFailOnFirstFailure

      public boolean isFailOnFirstFailure()


      Supported API: true
      Returns:
      true when set to fail on first error.
    • setFailOnFirstFailure

      public void setFailOnFirstFailure(boolean failOnFirstFailure)
      Used to indicate that the business rules engine should fail on the first validation result failure status. The default value is false so that a report of all validation rules can be generated. Setting to true will fail on first failure found.

      Supported API: true
      Parameters:
      failOnFirstFailure -
    • isUseRoleB

      public boolean isUseRoleB()


      Supported API: true
      Returns:
      The role of the link to populate the target objects in the validation criteria
    • setPrimaryBusinessObject

      public void setPrimaryBusinessObject(Object primaryBusinessObject)
      Set the primary business object.

      Supported API: true
      Parameters:
      primaryBusinessObject -
    • getPrimaryBusinessObject

      public Object getPrimaryBusinessObject()


      Supported API: true
      Returns:
      The primary business object