com.ibm.websphere.brb.strategy
Class ThrowViolationCombiningStrategy
java.lang.Object
|
+--com.ibm.websphere.brb.strategy.ThrowViolationCombiningStrategy
- All Implemented Interfaces:
- CombiningStrategy, java.io.Serializable
- public class ThrowViolationCombiningStrategy
- extends java.lang.Object
- implements CombiningStrategy, java.io.Serializable
Throws a ConstraintViolationException containing all failing ConstraintReturns if any results are false.
Returns a single true ConstraintReturn if all results are true. The input results are expected
to be of type ConstraintReturn or type Boolean. If this is not the case, a BusinessRuleBeansException is
thrown. If the overall result is false but there are no failing ConstraintReturns (i.e. all
failing rules returned Booleans), then the ConstraintViolationException that is thrown will not
contain any failing ConstraintReturns.
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
combineResults(TriggerPoint tp,
java.lang.Object[] results)
Throws a ConstraintViolationException containing all failed ConstraintReturns if any results are
false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrowViolationCombiningStrategy
public ThrowViolationCombiningStrategy()
combineResults
public java.lang.Object combineResults(TriggerPoint tp,
java.lang.Object[] results)
throws BusinessRuleBeansException
- Throws a ConstraintViolationException containing all failed ConstraintReturns if any results are
false. Returns a single true ConstraintReturn if all results are true.
- Specified by:
combineResults
in interface CombiningStrategy
- Following copied from interface:
com.ibm.websphere.brb.CombiningStrategy
- Parameters:
tp
- the trigger point which is used to make this callresults
- the list of results of firing the rules- Returns:
- The combined result of the rules fired on this TriggerPoint call. Any type of object
can be returned as the result.
- Throws:
BusinessRuleBeansException
- if any exceptions occur