org.apache.lenya.cms.publication.templating
Class ExistingAncestorSourceResolver

java.lang.Object
  extended by org.apache.lenya.cms.publication.templating.ExistingAncestorSourceResolver
All Implemented Interfaces:
SourceVisitor, VisitingSourceResolver

public class ExistingAncestorSourceResolver
extends java.lang.Object
implements VisitingSourceResolver

Source visitor to obtain the first existing source.

Version:
$Id: ExistingSourceResolver.java 179568 2005-06-02 09:27:26Z jwkaltz $

Constructor Summary
ExistingAncestorSourceResolver()
          Ctor.
 
Method Summary
 org.apache.excalibur.source.Source getSource()
           
 void visit(org.apache.excalibur.source.SourceResolver resolver, java.lang.String sourceUri)
          Visits a source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExistingAncestorSourceResolver

public ExistingAncestorSourceResolver()
Ctor.

Method Detail

getSource

public org.apache.excalibur.source.Source getSource()
Specified by:
getSource in interface VisitingSourceResolver
Returns:
the ancestor of the first existing source.

visit

public void visit(org.apache.excalibur.source.SourceResolver resolver,
                  java.lang.String sourceUri)
Description copied from interface: SourceVisitor
Visits a source. We pass the resolver and the URI so that the visitor can decide if it wants to resolve the source (mainly for performance reasons).

Specified by:
visit in interface SourceVisitor
Parameters:
resolver - The resolver.
sourceUri - The source URI.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.