org.opensync.tools
Class StylesheetCache

java.lang.Object
  extended byorg.opensync.tools.StylesheetCache

public class StylesheetCache
extends java.lang.Object

A utility class that caches XSLT stylesheets in memory.


Nested Class Summary
(package private) static class StylesheetCache.MapEntry
          This class represents a value in the cache Map.
 
Method Summary
static void flush(java.lang.String xsltFileName)
          Flush a specific cached stylesheet from memory.
static void flushAll()
          Flush all cached stylesheets from memory, emptying the cache.
static javax.xml.transform.Transformer newTransformer(java.lang.String xsltFileName)
          Obtain a new Transformer instance for the specified XSLT file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

flushAll

public static void flushAll()
Flush all cached stylesheets from memory, emptying the cache.


flush

public static void flush(java.lang.String xsltFileName)
Flush a specific cached stylesheet from memory.

Parameters:
xsltFileName - the file name of the stylesheet to remove.

newTransformer

public static javax.xml.transform.Transformer newTransformer(java.lang.String xsltFileName)
                                                      throws javax.xml.transform.TransformerConfigurationException,
                                                             java.net.MalformedURLException
Obtain a new Transformer instance for the specified XSLT file name. A new entry will be added to the cache if this is the first request for the specified file name.

Parameters:
xsltFileName - the file name of an XSLT stylesheet.
Returns:
a transformation context for the given stylesheet.
Throws:
javax.xml.transform.TransformerConfigurationException
java.net.MalformedURLException


Copyright © 2004 sourceforge. All Rights Reserved.