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?
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPageDescriptionCache
public DefaultPageDescriptionCache(ParserManager manager,
java.lang.String basePath,
boolean checkModified,
boolean displayAllErrors)
- Create a PageDescriptionCache.
- Parameters:
manager
- the ParserManager to use to parse filesbasePath
- the root path to search for UIX filescheckModified
- if true, check on each request if the underlying
UIX file has been modifieddisplayAllErrors
- if true, all attempts to parse that
result in any warnings/errors will result in output
of an error page.
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 BajaContextpage
- 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.