org.opencms.report.I_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.report;
import org.opencms.i18n.CmsMessageContainer;
import java.util.List;
import java.util.Locale;
/**
* This is the interface for the report classes which are used for the output
* during operations that run on a spearate Thread in OpenCms,
* like publish, import, export etc.
*
* @since 6.0.0
*/
public interface I_CmsReport {
/** Indicates default formatting. */
int FORMAT_DEFAULT = 0;
/** Indicates error formatting. */
int FORMAT_ERROR = 5;
/** Indicates headline formatting. */
int FORMAT_HEADLINE = 2;
/** Names of the report format constants. */
public static final String[] FORMAT_NAMES = {
"FORMAT_DEFAULT",
"FORMAT_WARNING",
"FORMAT_HEADLINE",
"FORMAT_NOTE",
"FORMAT_OK",
"FORMAT_NOTE"};
/** Indicates note formatting. */
int FORMAT_NOTE = 3;
/** Indicates OK formatting. */
int FORMAT_OK = 4;
/** Indicates warning formatting. */
int FORMAT_WARNING = 1;
/** Request parameter value that this report should create an "extended" output. */
String REPORT_TYPE_EXTENDED = "extended";
/** Request parameter value that this report should create a "simple" output. */
String REPORT_TYPE_SIMPLE = "simple";
/**
* Adds an error object to the list of errors that occurred during the report.
*
* @param obj the error object
*/
void addError(Object obj);
/**
* Adds a warning object to the list of warnings that occurred during the report.
*
* @param obj the error object
*/
void addWarning(Object obj);
/**
* Formats the runtime formatted as "hh:mm:ss".
*
* @return the runtime formatted as "hh:mm:ss"
*/
String formatRuntime();
/**
* Returns a list of all errors that occurred during the report.
*
* @return an error list that occurred during the report
*/
List