org.apache.excalibur.source.impl.validity
Class DeferredAggregatedValidity

java.lang.Object
  extended byorg.apache.excalibur.source.impl.validity.AbstractAggregatedValidity
      extended byorg.apache.excalibur.source.impl.validity.DeferredAggregatedValidity
All Implemented Interfaces:
java.io.Serializable, SourceValidity

public final class DeferredAggregatedValidity
extends AbstractAggregatedValidity
implements SourceValidity

A validation object using a List. This validity object does the same as the AggregatedValidity object, but the contained validity objects are only fetched when required.

Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:17 $
Author:
Avalon Development Team
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceValidity
INVALID, UNKNOWN, UNKNWON, VALID
 
Constructor Summary
DeferredAggregatedValidity()
           
 
Method Summary
 void add(DeferredValidity validity)
           
 int isValid()
          Check if the component is still valid.
 int isValid(SourceValidity validity)
          Check if the component is still valid.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.excalibur.source.impl.validity.AbstractAggregatedValidity
add, getValidities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeferredAggregatedValidity

public DeferredAggregatedValidity()
Method Detail

add

public void add(DeferredValidity validity)

isValid

public int isValid()
Check if the component is still valid. If 0 is returned the isValid(SourceValidity) must be called afterwards! If -1 is returned, the component is not valid anymore and if +1 is returnd, the component is valid.

Specified by:
isValid in interface SourceValidity

isValid

public int isValid(SourceValidity validity)
Description copied from interface: SourceValidity
Check if the component is still valid. This is only true if the incoming Validity is of the same type and has the "same" values.

The invocation order is that the isValid method of the old Validity object is called with the new one as a parameter.

Specified by:
isValid in interface SourceValidity
Returns:
-1 is returned, if the validity object is not valid anymore +1 is returned, if the validity object is still valid 0 is returned, if the validity check could not be performed. In this case, the new validity object is not usable. Examples for this are: when the validity objects have different types, or when one validity object for any reason is not able to get the required information.

toString

public java.lang.String toString()
Overrides:
toString in class AbstractAggregatedValidity


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.