com.softwareag.centrasite.appl.framework.validation.impl
Class IntegerConditionFactory.LimitCondition

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.validation.impl.AbstractCondition
      extended by com.softwareag.centrasite.appl.framework.validation.impl.IntegerConditionFactory.LimitCondition
All Implemented Interfaces:
Condition
Enclosing class:
IntegerConditionFactory

public static class IntegerConditionFactory.LimitCondition
extends AbstractCondition

This condition checks, whether the property value violates an upper, or lower limit.


Constructor Summary
IntegerConditionFactory.LimitCondition(ErrorCode pCode, java.lang.String pCnd, int pLimit)
          Creates a new instance.
 
Method Summary
 void check(java.lang.Object pSource, Constraint.Context pCtx, Constraint.Listener pListener)
          Called to decide on the conditions state.
 
Methods inherited from class com.softwareag.centrasite.appl.framework.validation.impl.AbstractCondition
error, error, getErrorCode, getName, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerConditionFactory.LimitCondition

public IntegerConditionFactory.LimitCondition(ErrorCode pCode,
                                              java.lang.String pCnd,
                                              int pLimit)
Creates a new instance.

Parameters:
pCode - The error code to throw, if the condition is violated.
pCnd - The limit type, either of ">=", "<=", ">", "<", "==", or "!=". For example, in the case of limit type ">=", the condition is violated, if the property value is lower than the limit.
pLimit - The limits numeric value. For example, in the case of limit type ">=", the condition is violated, if the property value is lower than the limit.
Method Detail

check

public void check(java.lang.Object pSource,
                  Constraint.Context pCtx,
                  Constraint.Listener pListener)
           throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Description copied from interface: Condition
Called to decide on the conditions state. The Condition must invoke the Constraint.Listener, if it thinks that the constraint is violated.

Throws:
com.softwareag.centrasite.appl.framework.CSAppFrameworkException