org.opencms.frontend.templateone
Class CmsTemplateFormRecommend

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.CmsTemplateForm
                      extended by org.opencms.frontend.templateone.CmsTemplateFormRecommend

public class CmsTemplateFormRecommend
extends CmsTemplateForm

Provides methods to build the page recommendation form.

Since:
6.0.0

Field Summary
 
Fields inherited from class org.opencms.frontend.templateone.CmsTemplateForm
MESSAGE_BUNDLE_FORM, PARAM_ACTION
 
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
CmsTemplateFormRecommend()
          Empty constructor, required for every JavaBean.
CmsTemplateFormRecommend(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Constructor, with parameters.
 
Method Summary
protected  java.lang.String checkTextsUri()
          Returns the text URI from the configuration file and checks the presence.
 java.lang.String getCopy()
          Returns the send copy to sender flag.
 java.lang.String getEmailRecipient()
          Returns the email recipient address.
 java.lang.String getEmailSender()
          Returns the email sender address.
 java.lang.String getMessage()
          Returns the message for the recipient.
 java.lang.String isCopyChecked()
          Examines the value of the send copy checkbox and returns the "checked" attribute.
 boolean sendMail()
          Sends the recommendation email(s) to the recipient and/or the sender.
 void setCopy(java.lang.String copy)
          Sets the send copy to sender flag.
 void setEmailRecipient(java.lang.String emailRecipient)
          Sets the email recipient address.
 void setEmailSender(java.lang.String emailSender)
          Sets the email sender address.
 void setMessage(java.lang.String message)
          Sets the message for the recipient.
 boolean validate()
          Validates the values of the input fields and creates error messages, if necessary.
 
Methods inherited from class org.opencms.frontend.templateone.CmsTemplateForm
getConfigPath, getError, getErrors, getFormattedString, getFormText, getFormUri, getPageTitle, getPageUri, getPageUri, getPageUrl, getTextsUri, hasValidationErrors, init, isChecked, isSelected, isSubmitted, isValidEmailAddress, removeHtmlTags, setErrors
 
Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBean
buildHtmlBodyEnd, getAreaName, 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
 

Constructor Detail

CmsTemplateFormRecommend

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


CmsTemplateFormRecommend

public CmsTemplateFormRecommend(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

getCopy

public java.lang.String getCopy()
Returns the send copy to sender flag.

Returns:
the send copy to sender flag

getEmailRecipient

public java.lang.String getEmailRecipient()
Returns the email recipient address.

Returns:
the email recipient address

getEmailSender

public java.lang.String getEmailSender()
Returns the email sender address.

Returns:
the email sender address

getMessage

public java.lang.String getMessage()
Returns the message for the recipient.

Returns:
the message for the recipient

isCopyChecked

public java.lang.String isCopyChecked()
Examines the value of the send copy checkbox and returns the "checked" attribute.

Returns:
the "checked" attribute or an empty String

sendMail

public boolean sendMail()
Sends the recommendation email(s) to the recipient and/or the sender.

Returns:
true if the emails were successfully sent, otherwise false;

setCopy

public void setCopy(java.lang.String copy)
Sets the send copy to sender flag.

Parameters:
copy - the send copy to sender flag

setEmailRecipient

public void setEmailRecipient(java.lang.String emailRecipient)
Sets the email recipient address.

Parameters:
emailRecipient - email recipient address

setEmailSender

public void setEmailSender(java.lang.String emailSender)
Sets the email sender address.

Parameters:
emailSender - the email sender address

setMessage

public void setMessage(java.lang.String message)
Sets the message for the recipient.

Parameters:
message - the message for the recipient

validate

public boolean validate()
Validates the values of the input fields and creates error messages, if necessary.

Specified by:
validate in class CmsTemplateForm
Returns:
true if all checked input values are valid, otherwise false

checkTextsUri

protected java.lang.String checkTextsUri()
Description copied from class: CmsTemplateForm
Returns the text URI from the configuration file and checks the presence.

Returns the default texts URI if the file specified in the configuration can not be found.

Specified by:
checkTextsUri in class CmsTemplateForm
Returns:
the text URI from the configuration file
See Also:
CmsTemplateForm.checkTextsUri()