org.apache.cocoon.components.modules.input
Class XMLFileModule.DocumentHelper

java.lang.Object
  extended by org.apache.cocoon.components.modules.input.XMLFileModule.DocumentHelper
Enclosing class:
XMLFileModule

protected static class XMLFileModule.DocumentHelper
extends Object

Takes care of (re-)loading and caching of sources.


Constructor Summary
XMLFileModule.DocumentHelper(boolean reload, boolean cache, String src, XMLFileModule instance)
          Creates a new DocumentHelper instance.
 
Method Summary
 Document getDocument(ComponentManager manager, SourceResolver resolver, Logger logger)
          Returns the Document belonging to the configured source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFileModule.DocumentHelper

public XMLFileModule.DocumentHelper(boolean reload,
                                    boolean cache,
                                    String src,
                                    XMLFileModule instance)
Creates a new DocumentHelper instance.

Parameters:
reload - a boolean value, whether this source should be reloaded if changed.
cache - a boolean value, whether this source should be kept in memory.
src - a String value containing the URI
Method Detail

getDocument

public Document getDocument(ComponentManager manager,
                            SourceResolver resolver,
                            Logger logger)
                     throws Exception
Returns the Document belonging to the configured source. Transparently handles reloading and caching.

Parameters:
manager - a ComponentManager value
resolver - a SourceResolver value
Returns:
a Document value
Throws:
Exception - if an error occurs


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.