Class RuleValidationCriteria
java.lang.Object
com.ptc.core.businessRules.validation.RuleValidationCriteria
- All Implemented Interfaces:
Serializable
The
Supported API: true
Extendable: false
RuleValidationCriteria contains information that is used by
all business rules within a business rule set.
Supported API: true
Extendable: false
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRuleValidationCriteria(WTCollection seedObjects, WTContainerRef containerRef) Creates a new RuleValidationCriteria.RuleValidationCriteria(WTCollection seedObjects, WTContainerRef containerRef, boolean useRoleB) Creates a new RuleValidationCriteria. -
Method Summary
Modifier and TypeMethodDescriptionThe container object for validation.
Supported API: trueWill return only target objects that are links.Will return the target objects.boolean
Supported API: trueboolean
Supported API: truevoidsetFailOnFirstFailure(boolean failOnFirstFailure) Used to indicate that the business rules engine should fail on the first validation result failure status.voidsetPrimaryBusinessObject(Object primaryBusinessObject) Set the primary business object.
-
Constructor Details
-
RuleValidationCriteria
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 theuseRoleBparameter 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
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
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
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
Set the primary business object.
Supported API: true- Parameters:
primaryBusinessObject-
-
getPrimaryBusinessObject
Supported API: true- Returns:
- The primary business object
-