📄 cmstemplateformletter.java
字号:
/*
* File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/frontend/templateone/CmsTemplateFormLetter.java,v $
* Date : $Date: 2006/03/27 14:52:51 $
* Version: $Revision: 1.14 $
*
* This library is part of OpenCms -
* the Open Source Content Mananagement System
*
* Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* For further information about Alkacon Software GmbH, please see the
* company website: http://www.alkacon.com
*
* For further information about OpenCms, please see the
* project website: http://www.opencms.org
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.opencms.frontend.templateone;
import org.opencms.mail.CmsHtmlMail;
import org.opencms.main.CmsException;
import org.opencms.main.CmsLog;
import org.opencms.main.OpenCms;
import org.opencms.util.CmsStringUtil;
import org.opencms.workplace.CmsWorkplace;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import org.apache.commons.logging.Log;
/**
* Provides methods to build the page "letter to the editor" form.<p>
*
* @author Andreas Zahner
*
* @version $Revision: 1.14 $
*
* @since 6.0.0
*/
public class CmsTemplateFormLetter extends CmsTemplateForm {
/** The log object for this class. */
private static final Log LOG = CmsLog.getLog(CmsTemplateFormLetter.class);
/** Stores the type of concern.<p> */
private String m_concern;
/** Stores the details of the concern.<p> */
private String m_concernDetail;
/** Stores the contact city.<p> */
private String m_contactCity;
/** Stores the contact country.<p> */
private String m_contactCountry;
/** Stores the contact email address.<p> */
private String m_contactEmail;
/** Stores the contacts first name.<p> */
private String m_contactFirstName;
/** Stores the contacts last name.<p> */
private String m_contactLastName;
/** Stores the contact street number.<p> */
private String m_contactNumber;
/** Stores the contact phone number.<p> */
private String m_contactPhone;
/** Stores the contact salutation.<p> */
private String m_contactSalutation;
/** Stores the contact street.<p> */
private String m_contactStreet;
/** Stores the contact title.<p> */
private String m_contactTitle;
/** Stores the contact zip code.<p> */
private String m_contactZip;
/** Stores the send copy to sender flag.<p> */
private String m_copy;
/** Stores the message for the recipient.<p> */
private String m_message;
/**
* Empty constructor, required for every JavaBean.<p>
*/
public CmsTemplateFormLetter() {
super();
// set the members to empty Strings
m_concern = "";
m_concernDetail = "";
m_contactCity = "";
m_contactCountry = "";
m_contactEmail = "";
m_contactFirstName = "";
m_contactLastName = "";
m_contactNumber = "";
m_contactPhone = "";
m_contactSalutation = "";
m_contactStreet = "";
m_contactTitle = "";
m_contactZip = "";
m_copy = "";
m_message = "";
}
/**
* Constructor, with parameters.<p>
*
* Use this constructor for the template.<p>
*
* @param context the JSP page context object
* @param req the JSP request
* @param res the JSP response
*/
public CmsTemplateFormLetter(PageContext context, HttpServletRequest req, HttpServletResponse res) {
super();
super.init(context, req, res);
}
/**
* Returns the concern of contact.<p>
*
* @return the concern of contact
*/
public String getConcern() {
return m_concern;
}
/**
* Returns the concern details if specified.<p>
*
* @return the concern details if specified
*/
public String getConcernDetail() {
return m_concernDetail;
}
/**
* Returns the contact city.<p>
*
* @return the contact city
*/
public String getContactCity() {
return m_contactCity;
}
/**
* Returns the contact country.<p>
*
* @return the contact country
*/
public String getContactCountry() {
return m_contactCountry;
}
/**
* Returns the contact email address.<p>
*
* @return the contact email address
*/
public String getContactEmail() {
return m_contactEmail;
}
/**
* Returns the contact first name.<p>
*
* @return the contact first name
*/
public String getContactFirstName() {
return m_contactFirstName;
}
/**
* Returns the contact last name.<p>
*
* @return the contact last name
*/
public String getContactLastName() {
return m_contactLastName;
}
/**
* Returns the contact street number.<p>
*
* @return the contact street number
*/
public String getContactNumber() {
return m_contactNumber;
}
/**
* Returns the contact phone number.<p>
*
* @return the contact phone number
*/
public String getContactPhone() {
return m_contactPhone;
}
/**
* Returns the contact salutation.<p>
*
* @return the contact salutation
*/
public String getContactSalutation() {
return m_contactSalutation;
}
/**
* Returns the contact street.<p>
*
* @return the contact street
*/
public String getContactStreet() {
return m_contactStreet;
}
/**
* Returns the contact title.<p>
*
* @return the contact title
*/
public String getContactTitle() {
return m_contactTitle;
}
/**
* Returns the contact zip code.<p>
*
* @return the contact zip code
*/
public String getContactZip() {
return m_contactZip;
}
/**
* Returns the send copy to sender flag.<p>
*
* @return the send copy to sender flag
*/
public String getCopy() {
return m_copy;
}
/**
* Returns the message for the recipient.<p>
*
* @return the message for the recipient
*/
public String getMessage() {
return m_message;
}
/**
* Returns the "checked" attribute if the current "concern" radio button is checked.<p>
*
* @param currentValue the value of the current radio button to check
* @return the "checked" attribute if the current "concern" radio button is checked
*/
public String isConcernChecked(String currentValue) {
if (isSelected(currentValue, getConcern())) {
return " checked=\"checked\"";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -