|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.rave.web.ui.renderer.template.LayoutDefinitionManager
com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager
public class XMLLayoutDefinitionManager
This class is a concrete implmentation of the abstract class
LayoutDefinitionManager
. It obtains LayoutDefinition
objects by interpreting the key
passed to
getLayoutDefinition(String)
as a path to an XML file
describing the LayoutDefinition
. It will first attempt to
resolve this path from the document root of the ServletContext or
PortletCotnext. If that fails, it will attempt to use the Classloader
to resolve it.
Locating the dtd for the XML file is done in a similar manner. It
will first attempt to locate the dtd relative to the ServletContext
(or PortletContext) root. If that fails it will attempt to use the
ClassLoader to resolve it. Optionally a different EntityResolver may
be supplied to provide a custom way of locating the dtd, this is done
via setEntityResolver(org.xml.sax.EntityResolver)
.
This class is a singleton. This means modifications to this class effect all threads using this class. This includes setting EntityResolvers and ErrorHandlers. These values only need to be set once to remain in effect as long as the JVM is running.
Nested Class Summary | |
---|---|
static class |
XMLLayoutDefinitionManager.ClassLoaderEntityResolver
This entity reolver looks for xml & dtd files that are included as SYSTEM entities in the java class-path. |
Field Summary | |
---|---|
static java.lang.String |
BASE_URI
|
static boolean |
DEBUG
|
static java.lang.String |
ENTITY_RESOLVER
This is an attribute key which can be used to provide an EntityResolver to the XML parser. |
static java.lang.String |
ERROR_HANDLER
|
Fields inherited from class com.sun.rave.web.ui.renderer.template.LayoutDefinitionManager |
---|
DEFAULT_LAYOUT_DEFINITION_MANAGER_IMPL, LAYOUT_DEFINITION_MANAGER_KEY |
Constructor Summary | |
---|---|
protected |
XMLLayoutDefinitionManager()
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getBaseURI()
This returns the LDM's XML parser baseURI which will be used to resolve relative URI's, null if not set. |
org.xml.sax.EntityResolver |
getEntityResolver()
This returns the LDM's entity resolver, null if not set. |
org.xml.sax.ErrorHandler |
getErrorHandler()
This returns the LDM's XML parser ErrorHandler, null if not set. |
static LayoutDefinitionManager |
getInstance()
This method returns an instance of this LayoutDefinitionManager. |
LayoutDefinition |
getLayoutDefinition(java.lang.String key)
This method is responsible for finding the requested LayoutDefinition for the given key . |
void |
setBaseURI(java.lang.String baseURI)
This method sets the LDM's BaseURI. |
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
This method sets the LDM's entity resolver. |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
This method sets the LDM's ErrorHandler. |
Methods inherited from class com.sun.rave.web.ui.renderer.template.LayoutDefinitionManager |
---|
getAttribute, getManager, getManager, setAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ENTITY_RESOLVER
public static final java.lang.String ERROR_HANDLER
public static final java.lang.String BASE_URI
public static boolean DEBUG
Constructor Detail |
---|
protected XMLLayoutDefinitionManager()
Method Detail |
---|
public static LayoutDefinitionManager getInstance()
XMLLayoutDefinitionManager
instancepublic LayoutDefinition getLayoutDefinition(java.lang.String key)
This method is responsible for finding the requested
LayoutDefinition
for the given key
.
getLayoutDefinition
in class LayoutDefinitionManager
key
- Key identifying the desired LayoutDefinition
LayoutDefinition
.public org.xml.sax.EntityResolver getEntityResolver()
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
entityResolver
- The EntityResolver to use.public org.xml.sax.ErrorHandler getErrorHandler()
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
errorHandler
- The ErrorHandler to use.public java.lang.String getBaseURI()
public void setBaseURI(java.lang.String baseURI)
baseURI
- The BaseURI to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |