|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.frontend.templateone.CmsTemplateBase
org.opencms.frontend.templateone.CmsTemplateBean
public class CmsTemplateBean
Provides methods to create the HTML for the frontend output in the main JSP template one.
| Field Summary | |
|---|---|
static java.lang.String |
FILE_CONFIG_COMMON
File name of the website area configuration file. |
static java.lang.String |
FILE_CSS
File name of the CSS style sheet to use. |
static java.lang.String |
FILE_CSS_ACCESSIBLE
File name of the accessible CSS style sheet to use. |
static java.lang.String |
FILE_LINKS_HEAD
File name of the head links configuration file. |
static java.lang.String |
FOLDER_ELEMENTS
Folder path to the included JSP elements. |
static java.lang.String |
MESSAGE_BUNDLE
Name of the resource bundle containing the localized messages. |
static java.lang.String |
MODULE_NAME
Name of the frontend module in OpenCms. |
static java.lang.String |
PARAM_ACCESSIBLE
Request parameter name to show the accessible version of a page. |
static java.lang.String |
PARAM_COMMON
Request parameter name to show the common version of a page. |
static java.lang.String |
PARAM_HELPURI
Request parameter name for the help page URI. |
static java.lang.String |
PARAM_LAYOUT
Request parameter name to determine the displayed version of a page. |
static java.lang.String |
PARAM_LOGINURI
Request parameter name for the login page URI. |
static java.lang.String |
PARAM_PART
Request parameter name to determine the part of a JSP element to include. |
static java.lang.String |
PARAM_PRINT
Request parameter name to show the print version of a page. |
static java.lang.String |
PARAM_SITE
Request parameter name for the current site. |
static java.lang.String |
PARAM_URI
Request parameter name for the uri. |
static java.lang.String |
PROPERTY_CONFIGPATH
Name of the property key to set the configuration path for the template. |
static java.lang.String |
PROPERTY_EXTENSIONMODULE
Name of the property key to set the extension module for the template. |
static java.lang.String |
PROPERTY_HEAD_DEFAULTLINK
Name of the property key to set the head default link. |
static java.lang.String |
PROPERTY_HEAD_ELEMENTURI
Name of the property key to set the head element URI. |
static java.lang.String |
PROPERTY_HEAD_IMGHEIGHT
Name of the property key to set the head image height. |
static java.lang.String |
PROPERTY_HEAD_IMGLINK
Name of the property key to set the head image link. |
static java.lang.String |
PROPERTY_HEAD_IMGURI
Name of the property key to set the head image uri. |
static java.lang.String |
PROPERTY_LAYOUT_CENTER
Name of the property key to set the path to the layout file for the center layout. |
static java.lang.String |
PROPERTY_LAYOUT_RIGHT
Name of the property key to set the path to the layout file for the right layout. |
static java.lang.String |
PROPERTY_NAVLEFT_ELEMENTURI
Name of the property key to set the left navigation include element uri. |
static java.lang.String |
PROPERTY_RESOURCEPATH
Name of the property key to set the resource path for the template. |
static java.lang.String |
PROPERTY_SHOW_HEADNAV
Name of the property key to determine if the head navigation row is shown. |
static java.lang.String |
PROPERTY_SHOW_NAVLEFT
Name of the property key to determine if the left navigation is shown. |
static java.lang.String |
PROPERTY_SHOWHEADIMAGE
Name of the property key to show the head image row. |
static java.lang.String |
PROPERTY_SHOWHEADLINKS
Name of the property key to show the head links row. |
static java.lang.String |
PROPERTY_SIDE_URI
Name of the property key to set the side element uri. |
static java.lang.String |
PROPERTY_STARTFOLDER
Name of the property key to set the start folder for navigation and search results. |
static java.lang.String |
PROPERTY_VALUE_NONE
Property value "none" for overriding certain properties. |
static java.lang.String |
RESOURCE_TYPE_MICROSITE_NAME
Resource type name for the microsite folders specifying a configurable subsite. |
| Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
ATTRIBUTE_ORIGINAL_URI |
| Fields inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
NOT_INITIALIZED |
| Constructor Summary | |
|---|---|
CmsTemplateBean()
Empty constructor, required for every JavaBean. |
|
CmsTemplateBean(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Constructor, with parameters. |
|
| Method Summary | |
|---|---|
void |
buildHtmlBodyEnd()
Builds the main html output for the template foot and includes all subelements depending on the settings. |
java.lang.String |
getAreaName()
Returns the name of the website area specified in the common configuration file. |
java.lang.String |
getConfigPath()
Returns the template configuration path in the OpenCms VFS. |
org.opencms.xml.content.CmsXmlContent |
getConfiguration()
Returns the common configuration properties for the current web site area. |
protected static org.opencms.xml.content.CmsXmlContent |
getConfigurationFile(java.lang.String fileName,
org.opencms.file.CmsObject cms)
Returns the initialized xmlcontent configuration file. |
java.lang.String |
getConfigurationValue(java.lang.String key)
Returns the value for the specified property key name from the configuration. |
java.lang.String |
getConfigurationValue(java.lang.String key,
java.lang.String defaultValue)
Returns the value for the specified property key name from the configuration. |
java.lang.String |
getDescription(java.lang.String defaultValue)
Returns the "Description" property value of the requested uri. |
java.lang.String |
getEncoding()
Returns the "content encoding" property value of the requested uri. |
java.lang.String |
getExtensionModuleFileUri(java.lang.String relFilePath)
Returns the file Uri of a module element to include. |
java.lang.String |
getHeadElementUri()
Returns the URI of the editable head element or "none" if no element is specified. |
java.util.List |
getHeadLinks()
Returns the list of the head links. |
java.lang.String |
getKeywords(java.lang.String defaultValue)
Returns the "Keywords" property value of the requested uri. |
java.lang.String |
getLayout()
Returns the current layout to generate from the template. |
java.lang.String |
getLeftNavigationElementUri()
Returns the left navigation include element uri property value. |
java.lang.String |
getNavigationStartFolder()
Returns the start folder for the navigation elements. |
java.util.Map |
getProperties()
Returns the Map of found resource properties. |
java.lang.String |
getResourcePath()
Returns the substituted path to the modules resource folder. |
java.lang.String |
getSearchIndexName()
Returns the search index name to use, depending on the current site. |
java.lang.String |
getStartFolder()
Returns the start folder for navigation and search results. |
java.lang.String |
getStyleSheetConfigUri()
Returns the URI of the CSS style sheet configuration file. |
java.lang.String |
getStyleSheetUri()
Returns the substituted URI of the CSS style sheet to use in the template. |
java.lang.String |
getStyleSheetUri(java.lang.String resPath,
java.lang.String config,
java.lang.String site,
java.util.Locale locale)
Returns the substituted URI of the CSS style sheet to use in the template. |
CmsTemplateParts |
getTemplateParts()
Returns the template parts instance to use for including static JSP elements. |
java.lang.String |
getTitle(java.lang.String defaultValue)
Returns the "Title" property value of the requested uri. |
void |
includeElements()
Includes the page elements if they are present. |
void |
includePopup(java.lang.String element,
java.lang.String title)
Includes page elements useable on popup pages ("popuphead", "popupfoot"). |
void |
includeRightLists()
Includes center list elements if defined. |
void |
init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Initialize this bean with the current page context, request and response. |
java.lang.String |
key(java.lang.String keyName)
Gets the localized resource string for a given message key. |
java.lang.String |
keyDefault(java.lang.String keyName,
java.lang.String defaultValue)
Returns the localized resource string for a given message key. |
org.opencms.i18n.CmsMessages |
messages()
Returns the initialized CmsMessages object to use on the JSP template. |
org.opencms.i18n.CmsMessages |
messages(java.lang.String bundleName)
Returns the initialized CmsMessages object to use on the JSP template. |
void |
putNavigationProperties()
Puts the information needed to build the navigation elements to the property map. |
void |
setLayout(java.lang.String layout)
Sets the current layout to generate from the template. |
boolean |
showAccessibleVersion()
Returns if the accessible version of the page should be shown. |
boolean |
showHeadImage()
Returns if the head image should be shown. |
boolean |
showHeadLinks()
Returns if the head links should be shown. |
boolean |
showHeadNavigation()
Returns if the head navigation menu should be shown. |
boolean |
showLeftNavigation()
Returns if the left navigation menu should be shown. |
boolean |
showPrintVersion()
Returns if the print version of the page should be created. |
| Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
getOriginalUri, initUri, isUriChanged |
| Methods inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user |
| Methods inherited from class org.opencms.jsp.CmsJspBean |
|---|
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FILE_CONFIG_COMMON
public static final java.lang.String FILE_CSS
public static final java.lang.String FILE_CSS_ACCESSIBLE
public static final java.lang.String FILE_LINKS_HEAD
public static final java.lang.String FOLDER_ELEMENTS
public static final java.lang.String MESSAGE_BUNDLE
public static final java.lang.String MODULE_NAME
public static final java.lang.String PARAM_ACCESSIBLE
public static final java.lang.String PARAM_COMMON
public static final java.lang.String PARAM_HELPURI
public static final java.lang.String PARAM_LAYOUT
public static final java.lang.String PARAM_LOGINURI
public static final java.lang.String PARAM_PART
public static final java.lang.String PARAM_PRINT
public static final java.lang.String PARAM_SITE
public static final java.lang.String PARAM_URI
public static final java.lang.String PROPERTY_CONFIGPATH
public static final java.lang.String PROPERTY_EXTENSIONMODULE
public static final java.lang.String PROPERTY_HEAD_DEFAULTLINK
public static final java.lang.String PROPERTY_HEAD_ELEMENTURI
public static final java.lang.String PROPERTY_HEAD_IMGHEIGHT
public static final java.lang.String PROPERTY_HEAD_IMGLINK
public static final java.lang.String PROPERTY_HEAD_IMGURI
public static final java.lang.String PROPERTY_LAYOUT_CENTER
public static final java.lang.String PROPERTY_LAYOUT_RIGHT
public static final java.lang.String PROPERTY_NAVLEFT_ELEMENTURI
public static final java.lang.String PROPERTY_RESOURCEPATH
public static final java.lang.String PROPERTY_SHOW_HEADNAV
public static final java.lang.String PROPERTY_SHOW_NAVLEFT
public static final java.lang.String PROPERTY_SHOWHEADIMAGE
public static final java.lang.String PROPERTY_SHOWHEADLINKS
public static final java.lang.String PROPERTY_SIDE_URI
public static final java.lang.String PROPERTY_STARTFOLDER
public static final java.lang.String PROPERTY_VALUE_NONE
public static final java.lang.String RESOURCE_TYPE_MICROSITE_NAME
| Constructor Detail |
|---|
public CmsTemplateBean()
public CmsTemplateBean(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Use this constructor for the template.
context - the JSP page context objectreq - the JSP requestres - the JSP response| Method Detail |
|---|
protected static org.opencms.xml.content.CmsXmlContent getConfigurationFile(java.lang.String fileName,
org.opencms.file.CmsObject cms)
fileName - the absolute path to the configuration filecms - the CmsObject to access the VFS
public void buildHtmlBodyEnd()
throws java.io.IOException,
javax.servlet.jsp.JspException
java.io.IOException - if writing the output fails
javax.servlet.jsp.JspException - if including an element failspublic java.lang.String getAreaName()
If the name is not found, the title of the start folder is shown.
public java.lang.String getConfigPath()
public org.opencms.xml.content.CmsXmlContent getConfiguration()
public java.lang.String getConfigurationValue(java.lang.String key)
key - the property key name to look up
public java.lang.String getConfigurationValue(java.lang.String key,
java.lang.String defaultValue)
Returns the default value argument if the property is not found.
key - the property key name to look updefaultValue - a default value
public java.lang.String getDescription(java.lang.String defaultValue)
defaultValue - the default value used when the property was not found
public java.lang.String getEncoding()
public java.lang.String getExtensionModuleFileUri(java.lang.String relFilePath)
Checks the presence of an extension module and if the requested element is available.
relFilePath - the path of the element relative to the module folder, e.g. "elements/myelement.jsp"
public java.lang.String getHeadElementUri()
public java.util.List getHeadLinks()
public java.lang.String getKeywords(java.lang.String defaultValue)
defaultValue - the default value used when the property was not found
public java.lang.String getLayout()
public java.lang.String getLeftNavigationElementUri()
public java.lang.String getNavigationStartFolder()
public java.util.Map getProperties()
public java.lang.String getResourcePath()
public java.lang.String getSearchIndexName()
Returns "[Projectname] project (VFS)" for the default site and the site root as index name for other sites.
public java.lang.String getStartFolder()
public java.lang.String getStyleSheetConfigUri()
public java.lang.String getStyleSheetUri()
public java.lang.String getStyleSheetUri(java.lang.String resPath,
java.lang.String config,
java.lang.String site,
java.util.Locale locale)
resPath - the resource pathconfig - the uri to the configuration settingssite - the sitelocale - the locale
public CmsTemplateParts getTemplateParts()
These element parts depend on the current Locale, the layout to display and the project.
public java.lang.String getTitle(java.lang.String defaultValue)
defaultValue - the default value used when the property was not found
public void includeElements()
throws java.io.IOException,
javax.servlet.jsp.JspException
The page elements are layouted in a 4 row, 2 columns layout. If one element of a single row is missing, the present element will be spanned across the 2 columns.
java.io.IOException - if writing the output fails
javax.servlet.jsp.JspException - if including an element fails
public void includePopup(java.lang.String element,
java.lang.String title)
throws javax.servlet.jsp.JspException
element - the element to display from the targettitle - the title for the popup page
javax.servlet.jsp.JspException - if including the element fails
public void includeRightLists()
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException - if including an element fails
public void init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
It is required to call one of the init() methods before you can use the instance of this bean.
init in class org.opencms.jsp.CmsJspBeancontext - the JSP page context objectreq - the JSP requestres - the JSP responsepublic java.lang.String key(java.lang.String keyName)
If the key was not found in the bundle, the return value is
"??? " + keyName + " ???". This will also be returned
if the bundle was not properly initialized first.
keyName - the key for the desired string
CmsMessages.key(String)
public java.lang.String keyDefault(java.lang.String keyName,
java.lang.String defaultValue)
If the key was not found in the bundle, the provided default value is returned.
keyName - the key for the desired stringdefaultValue - the default value in case the key does not exist in the bundle
CmsMessages.keyDefault(String, String)public org.opencms.i18n.CmsMessages messages()
public org.opencms.i18n.CmsMessages messages(java.lang.String bundleName)
bundleName - the name of the ResourceBundle to use
public void putNavigationProperties()
public void setLayout(java.lang.String layout)
layout - the current layout to generatepublic boolean showAccessibleVersion()
public boolean showHeadImage()
public boolean showHeadLinks()
public boolean showHeadNavigation()
public boolean showLeftNavigation()
public boolean showPrintVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||