|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.opencms.template.A_CmsTemplate
|
+--com.opencms.template.CmsXmlTemplate
|
+--com.opencms.workplace.CmsWorkplaceDefault
Common template class for displaying OpenCms workplace screens.
Reads template files of the content type CmsXmlWpTemplateFile.
Most special workplace classes may extend this class.
CmsXmlWpTemplateFile| Field Summary |
| Fields inherited from class com.opencms.template.CmsXmlTemplate |
C_BODY_ELEMENT, C_DEBUG, C_FRAME_SELECTOR, m_cache |
| 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 | |
CmsWorkplaceDefault()
|
|
| Method Summary | |
void |
bubblesort(Vector names,
Vector data)
Sorts two vectors using bubblesort. |
protected boolean |
checkJavaProperty(String propertyName,
String value)
Checks a Java System property for containing the given value |
protected boolean |
checkPort(CmsObject cms)
Checks, if the request is running on the correct port. |
Boolean |
doNotShow(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Used by workplace icons to decide whether the icon should be activated or not. |
CmsCacheDirectives |
getCacheDirectives(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
gets the caching information from the current template class. |
CmsXmlWpConfigFile |
getConfigFile(CmsObject cms)
Gets a reference to the default config file. |
protected void |
getConstantSelectEntries(Vector names,
Vector values,
String[] contents,
CmsXmlLanguageFile lang)
Help method used to fill the vectors returned to CmsSelectBox with constant values. |
Integer |
getFonts(CmsObject cms,
CmsXmlLanguageFile lang,
Vector names,
Vector values,
Hashtable parameters)
Gets all fonts available in the WYSIWYG editor. |
Object |
getKey(CmsObject cms,
String templateFile,
Hashtable parameters,
String templateSelector)
Gets the key that should be used to cache the results of this template class. |
protected String |
getLastUrl(CmsObject cms,
Hashtable parameters)
Get the currently valid lasturl parameter that can be
used for redirecting to the previous workplace screen. |
CmsXmlTemplateFile |
getOwnTemplateFile(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Reads in the template file and starts the XML parser for the expected content type |
Boolean |
isAdmin(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Checks if the current user is administrator. |
Boolean |
isAdminFalse(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Same as above, only that this returns always 'false'. |
boolean |
isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class are cacheable. |
Boolean |
isNotOnlineProject(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Checks if the current project is not the "Online" project. |
Boolean |
isOnlineProject(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Checks if the current project is the "Online" project. |
Boolean |
isProjectManager(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Checks if the current user is Project manager. |
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. |
Boolean |
isTheAdminUser(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
Checks if the current user is the administrator Admin. |
Object |
picsUrl(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
Deprecated. use resourcesUri(CmsObject, String, A_CmsXmlContent, Object) instead |
Object |
resourcesUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
User method to generate an URI for the system resources folder. |
Object |
scriptsUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
User method to generate an URI for the system scripts folder. |
protected byte[] |
startProcessing(CmsObject cms,
CmsXmlTemplateFile xmlTemplateDocument,
String elementName,
Hashtable parameters,
String templateSelector)
Starts the processing of the given template file by calling the getProcessedTemplateContent() method of the content defintition
of the corresponding content type.
|
Object |
userName(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
User method to get the name of the user. |
| Methods inherited from class com.opencms.template.A_CmsTemplate |
debugPrint, isExportable, isProxyPrivateCacheable, isProxyPublicCacheable |
| 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 |
isExportable, isProxyPrivateCacheable, isProxyPublicCacheable |
| Constructor Detail |
public CmsWorkplaceDefault()
| Method Detail |
public void bubblesort(Vector names,
Vector data)
names - The vector to sortdata - Vector with data that accompanies names.
protected boolean checkJavaProperty(String propertyName,
String value)
propertyName - Name of the propertyvalue - Value that should be checked
true if the property contains the value, false otherwise
public Boolean doNotShow(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
method="doNotShow"
is defined in the <ICON> tag.
This method always returns false thus icons controlled by
this method will never be activated.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
false.
public CmsXmlWpConfigFile getConfigFile(CmsObject cms)
throws CmsException
C_WORKPLACE_INI
cms - CmsObject Object for accessing system resources.
CmsException
protected void getConstantSelectEntries(Vector names,
Vector values,
String[] contents,
CmsXmlLanguageFile lang)
throws CmsException
CmsSelectBox with constant values.
names - Vector to be filled with the appropriate values in this method.values - Vector to be filled with the appropriate values in this method.lang - reference to the currently valid language file
CmsException
public Integer getFonts(CmsObject cms,
CmsXmlLanguageFile lang,
Vector names,
Vector values,
Hashtable parameters)
throws CmsException
names and values will
be filled with the appropriate information to be used for building
a select box.
cms - CmsObject Object for accessing system resources.lang - reference to the currently valid language filenames - Vector to be filled with the appropriate values in this method.values - Vector to be filled with the appropriate values in this method.parameters - Hashtable containing all user parameters (not used here).
CmsException
public Object getKey(CmsObject cms,
String templateFile,
Hashtable parameters,
String templateSelector)
getKey in interface I_CmsTemplategetKey in class CmsXmlTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileparameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
protected String getLastUrl(CmsObject cms,
Hashtable parameters)
lasturl parameter that can be
used for redirecting to the previous workplace screen.
cms - Cms object for accessing system resources.parameters - User parameters.
lasturl parameter.
public CmsXmlTemplateFile getOwnTemplateFile(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
throws CmsException
getOwnTemplateFile in interface I_CmsXmlTemplategetOwnTemplateFile in class CmsXmlTemplatecms - CmsObject Object for accessing system resources.templateFile - Filename of the template file.elementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
CmsException
public Boolean isAdmin(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
This method is used by workplace icons to decide whether the icon should
be activated or not. Icons will use this method if the attribute method="isAdministrator"
is defined in the <ICON> tag.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
true if the current user is in the Administrators Group, false otherwise.
CmsException - if there were errors while accessing project data.
public Boolean isAdminFalse(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
CmsException
public Boolean isTheAdminUser(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
This method is used by workplace icons to decide whether the icon should be activated or not.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
true if the current user is the user Admin, false otherwise.
CmsException - if there were errors while accessing project data.
public boolean isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
isCacheable in interface I_CmsTemplateisCacheable in class A_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 getCacheDirectives(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
getCacheDirectives in class CmsXmlTemplatecms - 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 top include other subtemplates have to check the streaming ability of their subclasses here!
isStreamable in interface I_CmsTemplateisStreamable in class CmsXmlTemplatecms - 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 isNotOnlineProject(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
This method is used by workplace icons to decide whether the icon should
be activated or not. Icons will use this method if the attribute method="isNotOnlineProject"
is defined in the <ICON> tag.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
true if the current project is the online project, false otherwise.
CmsException - if there were errors while accessing project data.
public Boolean isOnlineProject(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
This method is used by workplace icons to decide whether the icon should
be activated or not. Icons will use this method if the attribute method="isOnlineProject"
is defined in the <ICON> tag.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
true if the current project is the online project, false otherwise.
CmsException - if there were errors while accessing project data.
public Boolean isProjectManager(CmsObject cms,
CmsXmlLanguageFile lang,
Hashtable parameters)
throws CmsException
This method is used by workplace icons to decide whether the icon should
be activated or not. Icons will use this method if the attribute method="isProjectManager"
is defined in the <ICON> tag.
cms - CmsObject Object for accessing system resources (not used here).lang - reference to the currently valid language file (not used here).parameters - Hashtable containing all user parameters (not used here).
true if the current project is the online project, false otherwise.
CmsException - if there were errors while accessing project data.
public Object resourcesUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
throws CmsException
All pictures and style sheets should reside in the docroot of the webserver for performance reasons. This folder can be mounted into the OpenCms system to make it accessible for the OpenCms explorer.
The path to the docroot can be set in the workplace ini.
In any workplace template file, this method can be invoked by
<METHOD name="resourcesUri">PictureName</METHOD>.
Warning: Using this method, only workplace resources, usually residing
in the /system/workplace/resources folder, can be accessed.
cms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XML document (not used here).userObj - Hashtable with parameters (not used here).
CmsException
public Object scriptsUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
throws CmsException
cms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XML document (not used here).userObj - Hashtable with parameters (not used here).
CmsException
public Object picsUrl(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
throws CmsException
resourcesUri(CmsObject, String, A_CmsXmlContent, Object) instead
CmsException
protected byte[] startProcessing(CmsObject cms,
CmsXmlTemplateFile xmlTemplateDocument,
String elementName,
Hashtable parameters,
String templateSelector)
throws CmsException
getProcessedTemplateContent() method of the content defintition
of the corresponding content type.
Any exceptions thrown while processing the template will be caught, printed and and thrown again.
startProcessing in class CmsXmlTemplatecms - CmsObject Object for accessing system resources.xmlTemplateDocument - XML parsed document of the content type "XML template file" or
any derived content type.elementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
CmsExceptionprotected boolean checkPort(CmsObject cms)
cms - the CmsObject to check the port with.
public Object userName(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObj)
throws CmsException
cms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document (not used here).userObj - Hashtable with parameters (not used here).
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||