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

java.lang.Objectcom.opencms.launcher.A_CmsLauncher
com.opencms.launcher.CmsLinkLauncher
- All Implemented Interfaces:
- com.opencms.core.I_CmsConstants, I_CmsLauncher, com.opencms.boot.I_CmsLogChannels
- public class CmsLinkLauncher
- extends A_CmsLauncher
OpenCms launcher class for starting template classes implementing the I_CmsDumpTemplate interface. This can be used for plain text files or files containing graphics.
If no other start template class is given, CmsDumpTemplate will be used to create output.
- Version:
- $Revision: 1.16 $ $Date: 2003/01/20 23:59:23 $
| Field Summary | |
private static java.lang.String |
C_EXPORTED_LINKHTML_01
The html-code for returning the export file for external links |
private static java.lang.String |
C_EXPORTED_LINKHTML_02
|
private com.opencms.core.A_OpenCms |
m_openCms
The currently running OpenCms instance. |
protected static I_CmsTemplateCache |
m_templateCache
The template cache that holds all cached templates |
| Fields inherited from interface com.opencms.launcher.I_CmsLauncher |
C_TYPE_DUMP, C_TYPE_JAVASCRIPT, C_TYPE_JSP, C_TYPE_LINK, C_TYPE_PDF, C_TYPE_VELOCITY, C_TYPE_XML |
| 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 | |
CmsLinkLauncher()
|
|
| Method Summary | |
protected byte[] |
callCanonicalRoot(com.opencms.file.CmsObject cms,
com.opencms.template.I_CmsTemplate templateClass,
com.opencms.file.CmsFile masterTemplate,
java.util.Hashtable parameters)
Utility method used by the launcher implementation to give control to the CanonicalRoot. |
void |
clearCache()
Method for clearing this launchers template cache. |
static void |
clearLauncherCache(com.opencms.file.CmsObject cms)
Clear the XML template cache that is maintained in the launcher. |
protected java.lang.String |
getClassName()
Gets the name of the class in the form "[ClassName] " This can be used for error logging purposes. |
int |
getLauncherId()
Gets the ID that indicates the type of the launcher. |
static I_CmsTemplateCache |
getTemplateCache()
Gets a reference to the global template cache |
protected com.opencms.template.I_CmsTemplate |
getTemplateClass(com.opencms.file.CmsObject cms,
java.lang.String classname)
Calls the CmsClassManager to get an instance of the given template class. |
void |
handleException(com.opencms.file.CmsObject cms,
java.lang.Exception e,
java.lang.String errorText)
Utility method to handle any occurence of an execption. |
void |
initlaunch(com.opencms.file.CmsObject cms,
com.opencms.file.CmsFile file,
java.lang.String startTemplateClass,
com.opencms.core.A_OpenCms openCms)
Start method called by the OpenCms system to show a resource. |
protected void |
launch(com.opencms.file.CmsObject cms,
com.opencms.file.CmsFile file,
java.lang.String startTemplateClass,
com.opencms.core.A_OpenCms openCms)
Unitary method to start generating the output. |
void |
setOpenCms(com.opencms.core.A_OpenCms openCms)
Sets the currently running OpenCms instance. |
protected void |
writeBytesToResponse(com.opencms.file.CmsObject cms,
byte[] result)
Writes a given byte array to the HttpServletRespose output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_openCms
private com.opencms.core.A_OpenCms m_openCms
- The currently running OpenCms instance.
C_EXPORTED_LINKHTML_01
private static java.lang.String C_EXPORTED_LINKHTML_01
- The html-code for returning the export file for external links
C_EXPORTED_LINKHTML_02
private static java.lang.String C_EXPORTED_LINKHTML_02
m_templateCache
protected static I_CmsTemplateCache m_templateCache
- The template cache that holds all cached templates
| Constructor Detail |
CmsLinkLauncher
public CmsLinkLauncher()
| Method Detail |
getLauncherId
public int getLauncherId()
- Gets the ID that indicates the type of the launcher.
- Specified by:
getLauncherIdin interfaceI_CmsLauncher- Specified by:
getLauncherIdin classA_CmsLauncher
launch
protected void launch(com.opencms.file.CmsObject cms, com.opencms.file.CmsFile file, java.lang.String startTemplateClass, com.opencms.core.A_OpenCms openCms) throws com.opencms.core.CmsException
- Unitary method to start generating the output.
Every launcher has to implement this method.
In it possibly the selected file will be analyzed, and the
Canonical Root will be called with the appropriate
template class, template file and parameters. At least the
canonical root's output must be written to the HttpServletResponse.
- Specified by:
launchin classA_CmsLauncher
setOpenCms
public void setOpenCms(com.opencms.core.A_OpenCms openCms)
- Sets the currently running OpenCms instance.
- Specified by:
setOpenCmsin interfaceI_CmsLauncher- Overrides:
setOpenCmsin classA_CmsLauncher
callCanonicalRoot
protected byte[] callCanonicalRoot(com.opencms.file.CmsObject cms, com.opencms.template.I_CmsTemplate templateClass, com.opencms.file.CmsFile masterTemplate, java.util.Hashtable parameters) throws com.opencms.core.CmsException
- Utility method used by the launcher implementation to give control
to the CanonicalRoot.
The CanonicalRoot will call the master template and return a byte array of the
generated output.
clearCache
public void clearCache()
- Method for clearing this launchers template cache.
- Specified by:
clearCachein interfaceI_CmsLauncher
getClassName
protected java.lang.String getClassName()
- Gets the name of the class in the form "[ClassName] "
This can be used for error logging purposes.
getTemplateCache
public static I_CmsTemplateCache getTemplateCache()
- Gets a reference to the global template cache
getTemplateClass
protected com.opencms.template.I_CmsTemplate getTemplateClass(com.opencms.file.CmsObject cms, java.lang.String classname) throws com.opencms.core.CmsException
- Calls the CmsClassManager to get an instance of the given template class.
The returned object is checked to be an implementing class of the interface
I_CmsTemplate.
If the template cache of the template class is not yet setted, this will
be done, too.
handleException
public void handleException(com.opencms.file.CmsObject cms, java.lang.Exception e, java.lang.String errorText) throws com.opencms.core.CmsException
- Utility method to handle any occurence of an execption.
If the Exception is NO CmsException (i.e. it was not detected previously) it will be written to the logfile.
If the current user is the anonymous user, no further execption will be thrown, but a server error will be sent (we want to prevent the user from seeing any exeptions). Otherwise a new Exception will be thrown.
initlaunch
public void initlaunch(com.opencms.file.CmsObject cms, com.opencms.file.CmsFile file, java.lang.String startTemplateClass, com.opencms.core.A_OpenCms openCms) throws com.opencms.core.CmsException
- Start method called by the OpenCms system to show a resource.
In this method initial values valid for all launchers can be set and the _clearcache parameter is checked. After this the abstract method launch(...) is called to invoke the customized part of the launcher.
- Specified by:
initlaunchin interfaceI_CmsLauncher
clearLauncherCache
public static void clearLauncherCache(com.opencms.file.CmsObject cms)
- Clear the XML template cache that is maintained in the launcher.
To use this method, call it on one of the classes that extend
A_CmsLauncher (e.g. com.opencms.launcher.CmsXmlLauncher.clearLauncherCache()).
writeBytesToResponse
protected void writeBytesToResponse(com.opencms.file.CmsObject cms, byte[] result) throws com.opencms.core.CmsException
- Writes a given byte array to the HttpServletRespose output stream.
|
|||||||||
| Home >> All >> com >> opencms >> [ launcher overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC