|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.template.A_CmsTemplate
Abstract template class. Contains all commonly used methods for handling cache properties.
| 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(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Collect caching informations from the current template class. |
protected void |
debugPrint(String s,
int i)
|
protected String |
getClassName()
Help method to print nice classnames in error messages |
boolean |
isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class are cacheable in the internal caches. |
boolean |
isExportable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class are "static" and may be exported. |
boolean |
isProxyPrivateCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class may be cached by private proxy caches (browsers). |
boolean |
isProxyPublicCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class may be cached by public proxy caches. |
boolean |
isStreamable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the current template class is able to stream it's results directly to the response oputput stream. |
protected void |
throwException(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(String errorMessage,
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(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 |
public A_CmsTemplate()
| Method Detail |
protected String getClassName()
public boolean isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
isCacheable in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public boolean isProxyPrivateCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Default conditions are:
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
isProxyPrivateCacheable in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public boolean isProxyPublicCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Default conditions are:
Complex classes that are able to include other subtemplates have to check the cacheability of their subclasses here!
isProxyPublicCacheable in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public boolean isExportable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Default conditions are:
Complex classes that are able to include other subtemplates have to check the export ability of their subclasses here!
isExportable in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public boolean isStreamable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
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 true the results must be streamed directly
to the output stream. If it is false the results
must not be streamed.
Complex classes that are able to include other subtemplates have to check the streaming ability of their subclasses here!
isStreamable in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public CmsCacheDirectives collectCacheDirectives(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Complex classes that are able to include other subtemplates have to check the streaming ability of their subclasses here!
collectCacheDirectives in interface I_CmsTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
protected void debugPrint(String s,
int i)
protected void throwException(String errorMessage)
throws CmsException
errorMessage - String with the error message to be printed.
CmsException
protected void throwException(String errorMessage,
int type)
throws CmsException
errorMessage - String with the error message to be printed.type - Type of the exception to be thrown.
CmsException
protected void throwException(String errorMessage,
Exception e)
throws CmsException
errorMessage - String with the error message to be printed.e - Exception to be re-thrown.
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||