org.fopps.model
Class ConstraintChecker

java.lang.Object
  |
  +--org.fopps.model.ConstraintChecker
Direct Known Subclasses:
ConfigurationConstraintChecker, FeatureConstraintChecker

public abstract class ConstraintChecker
extends java.lang.Object

ConstraintChecker is the base class for all tests regarding feature constraint integrity. Subclasses must override checkConstraints to perform their own method of constraint checking.

See Also:
checkConstraints(AbstractItem), ConstraintViolation

Constructor Summary
ConstraintChecker()
          Creates a new constraint checker
 
Method Summary
 void addMessage(java.lang.String pMessage, int pSeverity)
          Adds a violation message
 void addMessage(java.lang.String pMessage, int pSeverity, AbstractItem pFirst, AbstractItem pSecond)
          Adds a violation message
abstract  boolean checkConstraints(AbstractItem pRoot)
          Checks the consistency of constraints return false, if one or more errors occured, otherwise true
 void clearMessages()
          Drops all violation messages
 java.util.Collection getMessages()
          Returns the list of constraint violations
 boolean hasMessages()
          Returns true, if constraint violations were detected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintChecker

public ConstraintChecker()
Creates a new constraint checker

Method Detail

checkConstraints

public abstract boolean checkConstraints(AbstractItem pRoot)
Checks the consistency of constraints return false, if one or more errors occured, otherwise true


getMessages

public java.util.Collection getMessages()
Returns the list of constraint violations


addMessage

public void addMessage(java.lang.String pMessage,
                       int pSeverity,
                       AbstractItem pFirst,
                       AbstractItem pSecond)
Adds a violation message

See Also:
ConstraintViolation.ConstraintViolation(int, String, AbstractItem, AbstractItem)

addMessage

public void addMessage(java.lang.String pMessage,
                       int pSeverity)
Adds a violation message

See Also:
ConstraintViolation.ConstraintViolation(int, String)

clearMessages

public void clearMessages()
Drops all violation messages


hasMessages

public boolean hasMessages()
Returns true, if constraint violations were detected



Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.