org.enhydra.barracuda.core.util.dom
Interface DOMLoader

All Known Implementing Classes:
DefaultDOMLoader

public interface DOMLoader

This interface defines the methods needed to implement a DOMLoader. A dom loader is used to front various dom factory implementations.

Note that the behavior of the getDOM() methods depend upon the backing dom factory implementation(s). Some dom factories only support loading documents from a class, others from a document path, while others may support both. Likewise, dom loader implementations may support one or both. Dom loader implementations must provide at least one backing dom factory and should provide a way for runtime configuration of one or more dom factories.

Where Implementations do not support a particular getDOM() method, they should simply throw an IOException and document their lack of support.

See Also:
DOMFactory

Method Summary
 Document getDOM(Class clazz)
          Get the DOM associated with the provided class, based on the default locale
 Document getDOM(Class clazz, Locale locale)
          Get the DOM associated with the provided class, based on the specified locale
 Document getDOM(String docPath)
          Get the DOM associated with the provided document path, based on the default locale
 Document getDOM(String docPath, Locale locale)
          Get the DOM associated with the provided document path, based on the specified Locale
 

Method Detail

getDOM

public Document getDOM(Class clazz)
                throws IOException
Get the DOM associated with the provided class, based on the default locale

Parameters:
clazz - the class to be loaded as a Document object
Returns:
the document that most closely corresponds with the requested class/locale combination
Throws:
IOException
See Also:
DOMFactory.getInstance(Class)

getDOM

public Document getDOM(Class clazz,
                       Locale locale)
                throws IOException
Get the DOM associated with the provided class, based on the specified locale

Parameters:
clazz - the class to be loaded as a Document object
locale - the target Locale (may be null)
Returns:
the document that most closely corresponds with the requested class/locale combination
Throws:
IOException
See Also:
DOMFactory.getInstance(Class)

getDOM

public Document getDOM(String docPath)
                throws IOException
Get the DOM associated with the provided document path, based on the default locale

Parameters:
docPath - the path to the document to be loaded as a Document object
Returns:
the document that most closely corresponds with the requested docPath/locale combination
Throws:
IOException
See Also:
DOMFactory.getInstance(String)

getDOM

public Document getDOM(String docPath,
                       Locale locale)
                throws IOException
Get the DOM associated with the provided document path, based on the specified Locale

Parameters:
docPath - the path to the document to be loaded as a Document object
locale - the target Locale (may be null)
Returns:
the document that most closely corresponds with the requested docPath/locale combination
Throws:
IOException
See Also:
DOMFactory.getInstance(String)


Copyright © 2003 BarracudaMVC.org All Rights Reserved.