org.opencms.workplace.CmsReport Maven / Gradle / Ivy
Show all versions of opencms-test Show documentation
/*
* This library is part of OpenCms -
* the Open Source Content Management System
*
* Copyright (c) Alkacon Software GmbH & Co. KG (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 & Co. KG, 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.workplace;
import org.opencms.file.CmsObject;
import org.opencms.i18n.CmsMessageContainer;
import org.opencms.jsp.CmsJspActionElement;
import org.opencms.main.CmsException;
import org.opencms.main.CmsLog;
import org.opencms.main.OpenCms;
import org.opencms.report.A_CmsReportThread;
import org.opencms.report.I_CmsReport;
import org.opencms.util.CmsStringUtil;
import org.opencms.util.CmsUUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import org.apache.commons.logging.Log;
/**
* Provides an output window for a CmsReport.
*
* @since 6.0.0
*/
public class CmsReport extends CmsMultiDialog {
/** Request parameter key for the type of the report. */
public static final String PARAM_REPORT_CONTINUEKEY = "reportcontinuekey";
/** Request parameter key for the type of the report. */
public static final String PARAM_REPORT_TYPE = "reporttype";
/** Max. byte size of report output on client. */
public static final int REPORT_UPDATE_SIZE = 512000;
/** Update time for report reloading. */
public static final int REPORT_UPDATE_TIME = 2000;
/** The log object for this class. */
private static final Log LOG = CmsLog.getLog(CmsReport.class);
/** Flag for refreching workplace .*/
private String m_paramRefreshWorkplace;
/** The key name which contains the localized message for the continue checkbox. */
private String m_paramReportContinueKey;
/** The type of this report. */
private String m_paramReportType;
/** The thread to display in this report. */
private CmsUUID m_paramThread;
/** The next thread to display after this report. */
private String m_paramThreadHasNext;
/**
* Public constructor.
*
* @param jsp an initialized JSP action element
*/
public CmsReport(CmsJspActionElement jsp) {
super(jsp);
}
/**
* Public constructor with JSP variables.
*
* @param context the JSP page context
* @param req the JSP request
* @param res the JSP response
*/
public CmsReport(PageContext context, HttpServletRequest req, HttpServletResponse res) {
this(new CmsJspActionElement(context, req, res));
}
/**
* Returns the style sheets for the report.
*
* @param cms the current users context
* @return the style sheets for the report
*/
public static String generateCssStyle(CmsObject cms) {
StringBuffer result = new StringBuffer(128);
result.append("\n");
return result.toString();
}
/**
* Generates the footer for the extended report view.
*
* @return html code
*/
public static String generatePageEndExtended() {
StringBuffer result = new StringBuffer(128);
result.append("