|
|||||||||
| Home >> All >> com >> opencms >> [ template overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.template
Class A_CmsTemplate

java.lang.Objectcom.opencms.template.A_CmsTemplate
- All Implemented Interfaces:
- com.opencms.core.I_CmsConstants, com.opencms.boot.I_CmsLogChannels, I_CmsTemplate
- Direct Known Subclasses:
- CmsDumpTemplate, CmsJavascriptTemplate, CmsXmlTemplate
- public abstract class A_CmsTemplate
- extends java.lang.Object
- implements com.opencms.core.I_CmsConstants, I_CmsTemplate, com.opencms.boot.I_CmsLogChannels
- extends java.lang.Object
Abstract template class. Contains all commonly used methods for handling cache properties.
- Version:
- $Revision: 1.10 $ $Date: 2003/03/02 18:43:55 $
| Field Summary |
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
A_CmsTemplate()
|
|
| Method Summary | |
CmsCacheDirectives |
collectCacheDirectives(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Collect caching informations from the current template class. |
protected void |
debugPrint(java.lang.String s,
int i)
|
protected java.lang.String |
getClassName()
Help method to print nice classnames in error messages |
boolean |
isCacheable(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Indicates if the results of this class are cacheable in the internal caches. |
boolean |
isExportable(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Indicates if the results of this class are "static" and may be exported. |
boolean |
isProxyPrivateCacheable(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Indicates if the results of this class may be cached by private proxy caches (browsers). |
boolean |
isProxyPublicCacheable(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Indicates if the results of this class may be cached by public proxy caches. |
boolean |
isStreamable(com.opencms.file.CmsObject cms,
java.lang.String templateFile,
java.lang.String elementName,
java.util.Hashtable parameters,
java.lang.String templateSelector)
Indicates if the current template class is able to stream it's results directly to the response oputput stream. |
protected void |
throwException(java.lang.String errorMessage)
Help method that handles any occuring error by writing an error message to the OpenCms logfile and throwing a CmsException of the type "unknown". |
protected void |
throwException(java.lang.String errorMessage,
java.lang.Exception e)
Help method that handles any occuring error by writing an error message to the OpenCms logfile and re-throwing a caught exception. |
protected void |
throwException(java.lang.String errorMessage,
int type)
Help method that handles any occuring error by writing an error message to the OpenCms logfile and throwing a CmsException of the given type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opencms.template.I_CmsTemplate |
createElement, getContent, getContent, getKey, isTemplateCacheSet, setTemplateCache, shouldReload |
| Constructor Detail |
A_CmsTemplate
public A_CmsTemplate()
| Method Detail |
getClassName
protected java.lang.String getClassName()
- Help method to print nice classnames in error messages
isCacheable
public boolean isCacheable(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Indicates if the results of this class are cacheable in the internal caches.
By default all resources in the online project may be stored in the internal
cache.
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
- Specified by:
isCacheablein interfaceI_CmsTemplate
isProxyPrivateCacheable
public boolean isProxyPrivateCacheable(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Indicates if the results of this class may be cached by private proxy caches (browsers).
Default conditions are:
- Resource is cacheable in the internal cache
- Caching key only consists of the URL
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
- Specified by:
isProxyPrivateCacheablein interfaceI_CmsTemplate
isProxyPublicCacheable
public boolean isProxyPublicCacheable(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Indicates if the results of this class may be cached by public proxy caches.
Default conditions are:
- Resource may be cached by private proxies
- Current user is Guest (otherwise privat information may be stored)
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
- Specified by:
isProxyPublicCacheablein interfaceI_CmsTemplate
isExportable
public boolean isExportable(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Indicates if the results of this class are "static" and may be exported.
Default conditions are:
- Resource may be cached by public proxies
- There are no parameters in the URL
- The resource's internal flag must not be set
Complex classes that are able to include other subtemplates have to check the export ability of their subclasses here!
- Specified by:
isExportablein interfaceI_CmsTemplate
isStreamable
public boolean isStreamable(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Indicates if the current template class is able to stream it's results
directly to the response oputput stream.
Classes must not set this feature, if they might throw special exception that cause HTTP errors (e.g. 404/Not Found), or if they might send HTTP redirects.
If a class sets this feature, it has to check the isStreaming() property of the RequestContext. If this is set to
truethe results must be streamed directly to the output stream. If it isfalsethe results must not be streamed.Complex classes that are able to include other subtemplates have to check the streaming ability of their subclasses here!
- Specified by:
isStreamablein interfaceI_CmsTemplate
collectCacheDirectives
public CmsCacheDirectives collectCacheDirectives(com.opencms.file.CmsObject cms, java.lang.String templateFile, java.lang.String elementName, java.util.Hashtable parameters, java.lang.String templateSelector)
- Collect caching informations from the current template class.
Complex classes that are able to include other subtemplates have to check the streaming ability of their subclasses here!
- Specified by:
collectCacheDirectivesin interfaceI_CmsTemplate
debugPrint
protected void debugPrint(java.lang.String s, int i)
throwException
protected void throwException(java.lang.String errorMessage) throws com.opencms.core.CmsException
- Help method that handles any occuring error by writing
an error message to the OpenCms logfile and throwing a
CmsException of the type "unknown".
throwException
protected void throwException(java.lang.String errorMessage, int type) throws com.opencms.core.CmsException
- Help method that handles any occuring error by writing
an error message to the OpenCms logfile and throwing a
CmsException of the given type.
throwException
protected void throwException(java.lang.String errorMessage, java.lang.Exception e) throws com.opencms.core.CmsException
- Help method that handles any occuring error by writing
an error message to the OpenCms logfile and re-throwing a
caught exception.
|
|||||||||
| Home >> All >> com >> opencms >> [ template overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opencms.template.A_CmsTemplate