net.sf.composite.validate.validators
Class BaseCompositeValidator

java.lang.Object
  extended by net.sf.composite.validate.validators.BaseCompositeValidator
All Implemented Interfaces:
ComponentValidator
Direct Known Subclasses:
SimpleComponentValidator

public abstract class BaseCompositeValidator
extends java.lang.Object
implements ComponentValidator

A convenient base class for component validators. This base class takes care of exception handling, argument validation and logging.

Since:
Mar 11, 2005
Author:
Matt Sgarlata

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
BaseCompositeValidator()
           
 
Method Summary
 ComponentAccessor getComponentAccessor()
           
 void setComponentAccessor(ComponentAccessor componentAccessor)
           
 void validate(java.lang.Object composite)
          Validates that the internal state of the given composite is valid.
protected abstract  void validateImpl(java.lang.Object composite)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

BaseCompositeValidator

public BaseCompositeValidator()
Method Detail

validateImpl

protected abstract void validateImpl(java.lang.Object composite)
                              throws java.lang.Exception
Throws:
java.lang.Exception

validate

public final void validate(java.lang.Object composite)
                    throws ComponentValidationException
Description copied from interface: ComponentValidator
Validates that the internal state of the given composite is valid.

Specified by:
validate in interface ComponentValidator
Parameters:
composite - the composite from which the components will be extracted
Throws:
ComponentValidationException - if the composite is not validation or validation could not be performed for some reason

getComponentAccessor

public ComponentAccessor getComponentAccessor()

setComponentAccessor

public void setComponentAccessor(ComponentAccessor componentAccessor)


Copyright © 2005-2008.