com.inxar.affirm
Class AbstractProclamation

java.lang.Object
  |
  +--com.inxar.affirm.AbstractProclamation
All Implemented Interfaces:
Proclamation
Direct Known Subclasses:
XMLProclamation

public abstract class AbstractProclamation
extends java.lang.Object
implements Proclamation

Base class for Proclamation implementations.


Constructor Summary
protected AbstractProclamation()
           
 
Method Summary
 void affirm(Affirmation affirmation)
           
 java.util.Enumeration enumerate(java.lang.Object key)
          Each key in a Proclamation may have several Affirmation objects defined upon it which are evaluated sequentially during a proclaim() invocation.
 java.util.Enumeration keys()
          Returns a sequence over the set of keys defined for this proclamation.
 Data proclaim(Input input)
          The proclaim() method is used to trigger verification of the given Input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProclamation

protected AbstractProclamation()
                        throws java.lang.Exception
Method Detail

affirm

public void affirm(Affirmation affirmation)

proclaim

public Data proclaim(Input input)
              throws ProclamationException
Description copied from interface: Proclamation
The proclaim() method is used to trigger verification of the given Input. If the Affirmation objects applied to the Input return successfully, no exception will be thrown. However, if any fail it will be recorded in an Errata object and returned to the caller via the exception handling mechanism, carried on the back of the ProclamationException object.
Specified by:
proclaim in interface Proclamation

keys

public java.util.Enumeration keys()
Description copied from interface: Proclamation
Returns a sequence over the set of keys defined for this proclamation. Therefore, given an Input, the keys given by this enumeration will be those attempted to be affirmed. The objects returned by the java.util.Enumeration.nextElement() method are those objects which acts as expected keys in the input. Empirically, the most common type of key is a String.
Specified by:
keys in interface Proclamation

enumerate

public java.util.Enumeration enumerate(java.lang.Object key)
Description copied from interface: Proclamation
Each key in a Proclamation may have several Affirmation objects defined upon it which are evaluated sequentially during a proclaim() invocation. This method will return Affirmation objects upon each valid call to java.util.Enumeration.nextElement().
Specified by:
enumerate in interface Proclamation