lumis.portal.xslcache
Class XslCacheManager

Package class diagram package XslCacheManager
java.lang.Object
  extended by lumis.portal.xslcache.XslCacheManager
All Implemented Interfaces:
IXslCacheManager

public class XslCacheManager
extends Object
implements IXslCacheManager

Manages the cache for XSLs.

Since:
4.0.0

Constructor Summary
XslCacheManager()
           
 
Method Summary
 void add(SessionConfig sessionConfig, XslCacheConfig xslCacheConfig, ITransaction transaction)
          Add a cache of the XSL.
 void clearXslCache(ITransaction transaction)
          Clears all XSL cache.
 void clearXslCache(SessionConfig sessionConfig, String fileName, ITransaction transaction)
          Clear the cache for the specified xsl file.
 void clearXslConfigCache(SessionConfig sessionConfig, ITransaction transaction)
          Clear the XslConfigCache.
 void clearXslConfigCache(SessionConfig sessionConfig, String fileName, ITransaction transaction)
          Clear the XslConfigCache.
protected  Templates createTemplates(String fileName)
          Create a new templates for a xsl file.
 Transformer createTransformer(String fileName)
          Get a Transformer.
 Transformer createTransformer(String xslStringDocument, String URIResolverPath)
          Creates a transformer for a specified XSL document string.
 void delete(SessionConfig sessionConfig, String fileName, ITransaction transaction)
          Delete de cache of the XSL.
 XslCacheConfig get(SessionConfig sessionConfig, String fileName, ITransaction transaction)
          Get the XslCacheConfig.
 boolean getDefaultCache()
          Get the default cache.
protected  Transformer getLumisTransformer()
           
 Transformer getTransformer(SessionConfig sessionConfig, String fileName, ITransaction transaction)
          Get a Transformer.
 boolean isXslCached(String fileName)
          Verify if the xsl file is cached.
 void setDefaultCache(boolean enable)
          Set the default cache.
 void update(SessionConfig sessionConfig, XslCacheConfig xslCacheConfig, ITransaction transaction)
          Update the cache of the XSL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XslCacheManager

public XslCacheManager()
Method Detail

getLumisTransformer

protected Transformer getLumisTransformer()
                                   throws PortalException
Throws:
PortalException

setDefaultCache

public void setDefaultCache(boolean enable)
Description copied from interface: IXslCacheManager
Set the default cache.

Specified by:
setDefaultCache in interface IXslCacheManager

getDefaultCache

public boolean getDefaultCache()
Description copied from interface: IXslCacheManager
Get the default cache.

Specified by:
getDefaultCache in interface IXslCacheManager
Returns:

add

public void add(SessionConfig sessionConfig,
                XslCacheConfig xslCacheConfig,
                ITransaction transaction)
         throws PortalException,
                ManagerException
Description copied from interface: IXslCacheManager
Add a cache of the XSL.

Specified by:
add in interface IXslCacheManager
Throws:
PortalException
ManagerException

delete

public void delete(SessionConfig sessionConfig,
                   String fileName,
                   ITransaction transaction)
            throws PortalException,
                   ManagerException
Description copied from interface: IXslCacheManager
Delete de cache of the XSL.

Specified by:
delete in interface IXslCacheManager
Throws:
PortalException
ManagerException

update

public void update(SessionConfig sessionConfig,
                   XslCacheConfig xslCacheConfig,
                   ITransaction transaction)
            throws PortalException,
                   ManagerException
Description copied from interface: IXslCacheManager
Update the cache of the XSL.

Specified by:
update in interface IXslCacheManager
Throws:
PortalException
ManagerException

get

public XslCacheConfig get(SessionConfig sessionConfig,
                          String fileName,
                          ITransaction transaction)
                   throws PortalException,
                          ManagerException
Description copied from interface: IXslCacheManager
Get the XslCacheConfig.

Specified by:
get in interface IXslCacheManager
Returns:
a XslCacheConfig.
Throws:
PortalException
ManagerException

clearXslConfigCache

public void clearXslConfigCache(SessionConfig sessionConfig,
                                String fileName,
                                ITransaction transaction)
                         throws PortalException,
                                ManagerException
Description copied from interface: IXslCacheManager
Clear the XslConfigCache.

Specified by:
clearXslConfigCache in interface IXslCacheManager
Throws:
PortalException
ManagerException

clearXslConfigCache

public void clearXslConfigCache(SessionConfig sessionConfig,
                                ITransaction transaction)
                         throws PortalException,
                                ManagerException
Description copied from interface: IXslCacheManager
Clear the XslConfigCache.

Specified by:
clearXslConfigCache in interface IXslCacheManager
Throws:
PortalException
ManagerException

getTransformer

public Transformer getTransformer(SessionConfig sessionConfig,
                                  String fileName,
                                  ITransaction transaction)
                           throws PortalException,
                                  ManagerException
Description copied from interface: IXslCacheManager
Get a Transformer.

Specified by:
getTransformer in interface IXslCacheManager
Returns:
a Transformer.
Throws:
PortalException
ManagerException

createTransformer

public Transformer createTransformer(String fileName)
                              throws PortalException
Description copied from interface: IXslCacheManager
Get a Transformer.

Specified by:
createTransformer in interface IXslCacheManager
Returns:
a Transformer.
Throws:
PortalException
ManagerException

createTransformer

public Transformer createTransformer(String xslStringDocument,
                                     String URIResolverPath)
                              throws PortalException
Description copied from interface: IXslCacheManager
Creates a transformer for a specified XSL document string. This method creates a Transformer for a XSL document that is not required to physically exist on the server. It takes as parameters the XSL document and a URI path on which the document is considered to exist.

Specified by:
createTransformer in interface IXslCacheManager
Returns:
Throws:
PortalException

createTemplates

protected Templates createTemplates(String fileName)
                             throws PortalException
Create a new templates for a xsl file.

Parameters:
fileName - the xsl file full path.
Returns:
the templates for the file.
Throws:
PortalException

clearXslCache

public void clearXslCache(SessionConfig sessionConfig,
                          String fileName,
                          ITransaction transaction)
                   throws PortalException,
                          ManagerException
Description copied from interface: IXslCacheManager
Clear the cache for the specified xsl file.

Specified by:
clearXslCache in interface IXslCacheManager
Parameters:
sessionConfig - the user session information.
fileName - the xsl file path.
transaction - the transaction for persistence access.
Throws:
PortalException
ManagerException

clearXslCache

public void clearXslCache(ITransaction transaction)
                   throws PortalException
Description copied from interface: IXslCacheManager
Clears all XSL cache.

Specified by:
clearXslCache in interface IXslCacheManager
Parameters:
transaction - the transaction for persistence access. If null, the cache is just cleared, else it is cleared as a transactional operation as specified in PortalCache.clear(ITransaction).
Throws:
PortalException

isXslCached

public boolean isXslCached(String fileName)
Description copied from interface: IXslCacheManager
Verify if the xsl file is cached.

Specified by:
isXslCached in interface IXslCacheManager
Parameters:
fileName - the xsl file path.
Returns:
true if the xsl is being cached and false otherwise.


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.