|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.util.dom.JivanDOMFactory
public class JivanDOMFactory
Jivan implementation of a DOMFactory. This class will load a DOM using the Jivan DocumentFactory.
Field Summary | |
---|---|
protected boolean |
initialized
used for flagging whether the jivanFactory has been initialized and avoiding unnecessary synchronization. |
protected org.jivan.html.document.DocumentFactory |
jivanFactory
Jivan DocumentFactory instance, stored so that it isn't re-created on every request. |
protected static org.apache.log4j.Logger |
logger
used for logging |
protected javax.servlet.ServletContext |
servletContext
optional, used to load resources from oa servlet context |
protected Object |
sync
arbitrary object used to synchronize upon |
Constructor Summary | |
---|---|
JivanDOMFactory()
|
Method Summary | |
---|---|
Document |
getInstance(Class clazz)
This method is not supported by this dom factory and will immediately throw an IOException if called! |
Document |
getInstance(String docPath)
Load a document directly from file using Jivan. |
void |
setServletContext(javax.servlet.ServletContext iservletContext)
Optional method to set the current servlet context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected javax.servlet.ServletContext servletContext
setServletContext(ServletContext)
protected final Object sync
protected boolean initialized
protected org.jivan.html.document.DocumentFactory jivanFactory
Constructor Detail |
---|
public JivanDOMFactory()
Method Detail |
---|
public Document getInstance(Class clazz) throws IOException
Jivan does not use a wrapper class for documents like XMLC. If you already have a Jivan DocumentManager, just use that directly.
getInstance
in interface DOMFactory
clazz
- the class to be loaded as a Document object
IOException
public Document getInstance(String docPath) throws IOException
The docPath can be provided in one of two forms: a path relative to
a servlet context such as "/WEB-INF/templates/foo.html", in which case
one would have to call setServletContext(javax.servlet.ServletContext)
before the first call
to this method, or a fully qualified URL (or URI) such as that returned
by URL.toExternalForm()
.
getInstance
in interface DOMFactory
docPath
- the path to the document to be loaded as a Document object
IOException
DOMFactory.getInstance(String)
public void setServletContext(javax.servlet.ServletContext iservletContext)
iservletContext
- the current servlet context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |