com.softwareag.centrasite.appl.framework.validation.impl
Class AbstractCondition

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.validation.impl.AbstractCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
AlwaysFailingCondition, IntegerConditionFactory.LimitCondition, IntegerConditionFactory.RangeCondition, LengthCondition, ListItemCondition, MandatoryItemCondition, MandatoryObjectCondition, MaxLengthCondition, ReCondition, RelationDateCondition, UniqueItemPropertyCondition

public abstract class AbstractCondition
extends java.lang.Object
implements Condition

Abstract base class for deriving conditions.


Constructor Summary
protected AbstractCondition(ErrorCode pErrorCode)
          Creates a new instance with the given error code.
 
Method Summary
protected  void error(Constraint.Listener pListener, Constraint.Context pContext, java.lang.Object pSource, ErrorCode pErrorCode, java.lang.String pErrorMessage, java.lang.Object... pDetails)
          Notifies the listener, that an error has occurred.
protected  void error(Constraint.Listener pListener, Constraint.Context pContext, java.lang.Object pSource, java.lang.String pErrorMessage, java.lang.Object... pDetails)
          Notifies the listener, that an error has occurred.
protected  ErrorCode getErrorCode()
          Returns the conditions error code.
protected  java.lang.String getName(java.lang.Object pSource)
          Returns the current validatables name.
protected  java.lang.Object getValue(java.lang.Object pSource)
          Returns the current validatables value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.softwareag.centrasite.appl.framework.validation.Condition
check
 

Constructor Detail

AbstractCondition

protected AbstractCondition(ErrorCode pErrorCode)
Creates a new instance with the given error code.

Method Detail

getErrorCode

protected ErrorCode getErrorCode()
Returns the conditions error code.


error

protected void error(Constraint.Listener pListener,
                     Constraint.Context pContext,
                     java.lang.Object pSource,
                     java.lang.String pErrorMessage,
                     java.lang.Object... pDetails)
              throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Notifies the listener, that an error has occurred.

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

error

protected void error(Constraint.Listener pListener,
                     Constraint.Context pContext,
                     java.lang.Object pSource,
                     ErrorCode pErrorCode,
                     java.lang.String pErrorMessage,
                     java.lang.Object... pDetails)
              throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Notifies the listener, that an error has occurred.

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

getValue

protected java.lang.Object getValue(java.lang.Object pSource)
                             throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Returns the current validatables value.

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

getName

protected java.lang.String getName(java.lang.Object pSource)
Returns the current validatables name.