|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.opencms.launcher.A_CmsLauncher
|
+--com.opencms.launcher.CmsLinkLauncher
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.
| Field Summary | |
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(CmsObject cms,
I_CmsTemplate templateClass,
CmsFile masterTemplate,
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(CmsObject cms)
Clear the XML template cache that is maintained in the launcher. |
protected 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 I_CmsTemplate |
getTemplateClass(CmsObject cms,
String classname)
Calls the CmsClassManager to get an instance of the given template class. |
void |
handleException(CmsObject cms,
Exception e,
String errorText)
Utility method to handle any occurence of an execption. |
void |
initlaunch(CmsObject cms,
CmsFile file,
String startTemplateClass,
A_OpenCms openCms)
Start method called by the OpenCms system to show a resource. |
protected void |
launch(CmsObject cms,
CmsFile file,
String startTemplateClass,
A_OpenCms openCms)
Unitary method to start generating the output. |
void |
setOpenCms(A_OpenCms openCms)
Sets the currently running OpenCms instance. |
protected void |
writeBytesToResponse(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 |
protected static I_CmsTemplateCache m_templateCache
| Constructor Detail |
public CmsLinkLauncher()
| Method Detail |
public int getLauncherId()
getLauncherId in interface I_CmsLaunchergetLauncherId in class com.opencms.launcher.A_CmsLauncher
protected void launch(CmsObject cms,
CmsFile file,
String startTemplateClass,
A_OpenCms openCms)
throws CmsException
launch in class com.opencms.launcher.A_CmsLaunchercms - CmsObject Object for accessing system resourcesfile - CmsFile Object with the selected resource to be shownstartTemplateClass - Name of the template class to start with.openCms - a instance of A_OpenCms for redirect-needs
CmsExceptionpublic void setOpenCms(A_OpenCms openCms)
setOpenCms in interface I_CmsLaunchersetOpenCms in class com.opencms.launcher.A_CmsLauncher
protected byte[] callCanonicalRoot(CmsObject cms,
I_CmsTemplate templateClass,
CmsFile masterTemplate,
Hashtable parameters)
throws CmsException
cms - CmsObject Object for accessing system resources.templateClass - Class that should generate the output of the master template.masterTemplate - CmsFile Object with masterTemplate for the output.parameters - Hashtable with all parameters for the template class.
CmsExceptionpublic void clearCache()
clearCache in interface I_CmsLauncherprotected String getClassName()
public static I_CmsTemplateCache getTemplateCache()
protected I_CmsTemplate getTemplateClass(CmsObject cms,
String classname)
throws CmsException
cms - CmsObject object for accessing system resources.classname - Name of the requested template class.
CmsException.
CmsException
public void handleException(CmsObject cms,
Exception e,
String errorText)
throws CmsException
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.
cms - CmsObject Object for accessing system resources.e - Exception that should be handled.errorText - Error message that should be shown.
CmsException
public void initlaunch(CmsObject cms,
CmsFile file,
String startTemplateClass,
A_OpenCms openCms)
throws CmsException
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.
initlaunch in interface I_CmsLaunchercms - CmsObject Object for accessing system resources.file - CmsFile Object with the selected resource to be shown.startTemplateClass - Name of the template class to start with.openCms - a instance of A_OpenCms for redirect-needs
CmsExceptionpublic static void clearLauncherCache(CmsObject cms)
cms - an initialized CmsObject
protected void writeBytesToResponse(CmsObject cms,
byte[] result)
throws CmsException
result - byte array that should be written.
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||