com.sun.rave.web.ui.renderer.template.xml
Class XMLLayoutDefinitionManager.ClassLoaderEntityResolver

java.lang.Object
  extended by com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager.ClassLoaderEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver
Enclosing class:
XMLLayoutDefinitionManager

public static class XMLLayoutDefinitionManager.ClassLoaderEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

This entity reolver looks for xml & dtd files that are included as SYSTEM entities in the java class-path. If the file is not found in the class path the resolver returns null, allowing default mechanism to search for the file on the file system.


Constructor Summary
XMLLayoutDefinitionManager.ClassLoaderEntityResolver()
          Constructor.
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
           This method attempts resolves the systemId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLLayoutDefinitionManager.ClassLoaderEntityResolver

public XMLLayoutDefinitionManager.ClassLoaderEntityResolver()
Constructor.

Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)

This method attempts resolves the systemId. The systemId must end in .dtd or .xml for this method to do anything. If it does, it will attempt to resolve the value via the classpath. If it is unable to locate it in the classpath, it will return null to single default behavior (locate the file on the filesystem).

The dtd in the LayoutDefinition XML file should be specified as follows:

<!DOCTYPE layoutDefinition SYSTEM "/layout/layout.dtd">

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - Not used.
systemId - The id to resolve.
Returns:
The InputSource (null if it should use default behavior)