org.opencms.frontend.templateone
Class CmsTemplateImprint

java.lang.Object
  extended by org.opencms.jsp.CmsJspBean
      extended by org.opencms.jsp.CmsJspActionElement
          extended by org.opencms.frontend.templateone.CmsTemplateBase
              extended by org.opencms.frontend.templateone.CmsTemplateBean
                  extended by org.opencms.frontend.templateone.CmsTemplateImprint

public class CmsTemplateImprint
extends CmsTemplateBean

Provides methods to build the imprint popup information of the pages of template one.

Since:
6.0.0

Field Summary
static java.lang.String FILENAME_CONFIGFILE
          Default file name of the imprint configuration file.
static java.lang.String PROPERTY_CONFIGFILE
          Name of the property key to set the path to the configuration file.
static java.lang.String PROPERTY_LINK_LEGAL
          Name of the property key to set the link to the legal notes page.
static java.lang.String PROPERTY_LINK_PRIVACY
          Name of the property key to set the link to the privacy policy page.
 
Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBean
FILE_CONFIG_COMMON, FILE_CSS, FILE_CSS_ACCESSIBLE, FILE_LINKS_HEAD, FOLDER_ELEMENTS, MESSAGE_BUNDLE, MODULE_NAME, PARAM_ACCESSIBLE, PARAM_COMMON, PARAM_HELPURI, PARAM_LAYOUT, PARAM_LOGINURI, PARAM_PART, PARAM_PRINT, PARAM_SITE, PARAM_URI, PROPERTY_CONFIGPATH, PROPERTY_EXTENSIONMODULE, PROPERTY_HEAD_DEFAULTLINK, PROPERTY_HEAD_ELEMENTURI, PROPERTY_HEAD_IMGHEIGHT, PROPERTY_HEAD_IMGLINK, PROPERTY_HEAD_IMGURI, PROPERTY_LAYOUT_CENTER, PROPERTY_LAYOUT_RIGHT, PROPERTY_NAVLEFT_ELEMENTURI, PROPERTY_RESOURCEPATH, PROPERTY_SHOW_HEADNAV, PROPERTY_SHOW_NAVLEFT, PROPERTY_SHOWHEADIMAGE, PROPERTY_SHOWHEADLINKS, PROPERTY_SIDE_URI, PROPERTY_STARTFOLDER, PROPERTY_VALUE_NONE, RESOURCE_TYPE_MICROSITE_NAME
 
Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBase
ATTRIBUTE_ORIGINAL_URI
 
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
 
Constructor Summary
CmsTemplateImprint()
          Empty constructor, required for every JavaBean.
CmsTemplateImprint(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Constructor, with parameters.
 
Method Summary
 java.lang.String buildEmailEntry(java.lang.String className, java.lang.String localeKey)
          Returns the html of the email address for the imprint.
 java.lang.String buildImprintEntry(java.lang.String className, java.lang.String localeKey, java.lang.String nodeName)
          Builds the html for a single imprint information row.
protected  java.lang.String getEmail(java.lang.String defaultValue)
          Returns the email address provided in the imprint configuration.
 java.lang.String getImprintValue(java.lang.String nodeName)
          Returns the value of the specified node name from the imprint configuration.
 java.lang.String getLinkLegalNotes()
          Returns the substituted link to the legal notes page.
 java.lang.String getLinkPrivacy()
          Returns the substituted link to the privacy policy page.
 java.lang.String getUrl()
          Returns the URL of the page to be displayed on the imprint.
 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.
 
Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBean
buildHtmlBodyEnd, getAreaName, getConfigPath, getConfiguration, getConfigurationFile, getConfigurationValue, getConfigurationValue, getDescription, getEncoding, getExtensionModuleFileUri, getHeadElementUri, getHeadLinks, getKeywords, getLayout, getLeftNavigationElementUri, getNavigationStartFolder, getProperties, getResourcePath, getSearchIndexName, getStartFolder, getStyleSheetConfigUri, getStyleSheetUri, getStyleSheetUri, getTemplateParts, getTitle, includeElements, includePopup, includeRightLists, key, keyDefault, messages, messages, putNavigationProperties, setLayout, showAccessibleVersion, showHeadImage, showHeadLinks, showHeadNavigation, showLeftNavigation, showPrintVersion
 
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

FILENAME_CONFIGFILE

public static final java.lang.String FILENAME_CONFIGFILE
Default file name of the imprint configuration file.

See Also:
Constant Field Values

PROPERTY_CONFIGFILE

public static final java.lang.String PROPERTY_CONFIGFILE
Name of the property key to set the path to the configuration file.

See Also:
Constant Field Values

PROPERTY_LINK_LEGAL

public static final java.lang.String PROPERTY_LINK_LEGAL
Name of the property key to set the link to the legal notes page.

See Also:
Constant Field Values

PROPERTY_LINK_PRIVACY

public static final java.lang.String PROPERTY_LINK_PRIVACY
Name of the property key to set the link to the privacy policy page.

See Also:
Constant Field Values
Constructor Detail

CmsTemplateImprint

public CmsTemplateImprint()
Empty constructor, required for every JavaBean.


CmsTemplateImprint

public CmsTemplateImprint(javax.servlet.jsp.PageContext context,
                          javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
Constructor, with parameters.

Use this constructor for the template.

Parameters:
context - the JSP page context object
req - the JSP request
res - the JSP response
Method Detail

buildEmailEntry

public java.lang.String buildEmailEntry(java.lang.String className,
                                        java.lang.String localeKey)
Returns the html of the email address for the imprint.

Parameters:
className - the CSS class name for the table cells
localeKey - the key name for the localized entry description
Returns:
the html of the email address for the imprint

buildImprintEntry

public java.lang.String buildImprintEntry(java.lang.String className,
                                          java.lang.String localeKey,
                                          java.lang.String nodeName)
Builds the html for a single imprint information row.

If the required information is not configured, the row will not be displayed.

Parameters:
className - the CSS class name for the table cells
localeKey - the key name for the localized entry description
nodeName - the name of the imprint configuration node
Returns:
the html for a single imprint information row

getImprintValue

public java.lang.String getImprintValue(java.lang.String nodeName)
Returns the value of the specified node name from the imprint configuration.

Parameters:
nodeName - the name of the imprint configuration node
Returns:
the value of the specified node name from the imprint configuration

getLinkLegalNotes

public java.lang.String getLinkLegalNotes()
Returns the substituted link to the legal notes page.

Returns:
the substituted link to the legal notes page

getLinkPrivacy

public java.lang.String getLinkPrivacy()
Returns the substituted link to the privacy policy page.

Returns:
the substituted link to the privacy policy page

getUrl

public java.lang.String getUrl()
Returns the URL of the page to be displayed on the imprint.

Returns:
the URL of the page

init

public 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.

It is required to call one of the init() methods before you can use the instance of this bean.

Overrides:
init in class CmsTemplateBean
Parameters:
context - the JSP page context object
req - the JSP request
res - the JSP response

getEmail

protected java.lang.String getEmail(java.lang.String defaultValue)
Returns the email address provided in the imprint configuration.

Parameters:
defaultValue - email address used if no email is provided in the configuration.

Returns:
the email address provided in the imprint configuration