Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.servlet.xml
Class DefaultPageDescriptionCache

java.lang.Object
  |
  +--oracle.cabo.servlet.xml.DefaultPageDescriptionCache
All Implemented Interfaces:
PageDescriptionCache

public class DefaultPageDescriptionCache
extends java.lang.Object
implements PageDescriptionCache

Implements a cache for UIX PageDescriptions. The cache can automatically check if the underlying file has been modified, and handles parsing errors.

=-=AEW Base class/interface? Move into cache package?


Constructor Summary
DefaultPageDescriptionCache(ParserManager manager, java.lang.String basePath, boolean checkModified, boolean displayAllErrors)
          Create a PageDescriptionCache.
DefaultPageDescriptionCache(ParserManager manager, java.lang.String basePath, int msBetweenChecks, boolean displayAllErrors)
          Create a PageDescriptionCache.
 
Method Summary
protected  java.util.Dictionary createCacheDictionary()
          Creates the dictionary for the cache.
protected  PageDescription createPageDescription(BajaContext context, Page page, NameResolver resolver, InputStreamProvider provider)
          Creates the page description for the specified UIX file.
 PageDescription getPageDescription(BajaContext context, Page page)
          Gets a single PageDescription from the cache.
protected  NameResolver getResolver(BajaContext context, Page page)
           
protected  java.lang.String getUIXFileName(BajaContext context, Page page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPageDescriptionCache

public DefaultPageDescriptionCache(ParserManager manager,
                                   java.lang.String basePath,
                                   boolean checkModified,
                                   boolean displayAllErrors)
Create a PageDescriptionCache.
Parameters:
manager - the ParserManager to use to parse files
basePath - the root path to search for UIX files
checkModified - if true, check on each request if the underlying UIX file has been modified
displayAllErrors - if true, all attempts to parse that result in any warnings/errors will result in output of an error page.

DefaultPageDescriptionCache

public DefaultPageDescriptionCache(ParserManager manager,
                                   java.lang.String basePath,
                                   int msBetweenChecks,
                                   boolean displayAllErrors)
Create a PageDescriptionCache.
Parameters:
manager - the ParserManager to use to parse files
basePath - the root path to search for UIX files
msBetweenChecks - The number of milliseconds required to elapse before checking whether the UIX file was modified
displayAllErrors - if true, all attempts to parse that result in any warnings/errors will result in output of an error page.
Method Detail

getPageDescription

public PageDescription getPageDescription(BajaContext context,
                                          Page page)
Gets a single PageDescription from the cache.

Specified by:
getPageDescription in interface PageDescriptionCache
Parameters:
context - the current BajaContext
page - the page for the PageDescription
Returns:
a PageDescription object, or null if the file could not be loaded at all

createPageDescription

protected PageDescription createPageDescription(BajaContext context,
                                                Page page,
                                                NameResolver resolver,
                                                InputStreamProvider provider)
                                         throws java.io.IOException
Creates the page description for the specified UIX file.

getResolver

protected NameResolver getResolver(BajaContext context,
                                   Page page)

getUIXFileName

protected java.lang.String getUIXFileName(BajaContext context,
                                          Page page)

createCacheDictionary

protected java.util.Dictionary createCacheDictionary()
Creates the dictionary for the cache. Clients can subclass to substitute an LRU data structure, etc.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.