com.softwareag.centrasite.appl.framework.validation.impl
Class AbstractConstraint
java.lang.Object
com.softwareag.centrasite.appl.framework.validation.impl.AbstractConstraint
- All Implemented Interfaces:
- Condition, Constraint, Scope
- Direct Known Subclasses:
- DefaultReadOnlyConstraint, DefaultValidationConstraint
public abstract class AbstractConstraint
- extends java.lang.Object
- implements Constraint
Default implementation of Constraint
. The constraint is built
as a composition of Scope
, and Condition
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConstraint
public AbstractConstraint(Scope pScope,
Condition pCondition)
- Creates a new instance with the given condition and scope.
isApplicable
public boolean isApplicable(java.lang.Object pSource,
Constraint.Context pContext)
throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
- Description copied from interface:
Scope
- Returns, whether a
Constraint
is applicable.
- Specified by:
isApplicable
in interface Scope
- Returns:
- True, if the
Constraint
is applicable, false otherwise.
In other words, true, if the Constraint
is enabled, or false,
if the Constraint
is disabled.
- Throws:
com.softwareag.centrasite.appl.framework.CSAppFrameworkException
check
public void check(java.lang.Object pSource,
Constraint.Context pContext,
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.
- Specified by:
check
in interface Condition
- Throws:
com.softwareag.centrasite.appl.framework.CSAppFrameworkException