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

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

protected 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(ServiceManager manager, SourceResolver resolver, Log 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(ServiceManager manager,
                            SourceResolver resolver,
                            Log logger)
                     throws Exception
Returns the Document belonging to the configured source. Transparently handles reloading and caching.

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


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