KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > tools > database > CmsDatabaseExportReport


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/database/CmsDatabaseExportReport.java,v $
3  * Date : $Date: 2005/06/23 11:11:23 $
4  * Version: $Revision: 1.6 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.workplace.tools.database;
33
34 import org.opencms.importexport.CmsVfsImportExportHandler;
35 import org.opencms.jsp.CmsJspActionElement;
36 import org.opencms.report.I_CmsReportThread;
37 import org.opencms.workplace.list.A_CmsListReport;
38 import org.opencms.workplace.threads.CmsExportThread;
39
40 import java.util.Map JavaDoc;
41
42 import javax.servlet.http.HttpServletRequest JavaDoc;
43 import javax.servlet.http.HttpServletResponse JavaDoc;
44 import javax.servlet.jsp.PageContext JavaDoc;
45
46 /**
47  * Provides a report for exporting VFS resources to zipped files of the OpenCms server.<p>
48  *
49  * @author Andreas Zahner
50  *
51  * @version $Revision: 1.6 $
52  *
53  * @since 6.0.0
54  */

55 public class CmsDatabaseExportReport extends A_CmsListReport {
56
57     /** Request parameter name for the class name to get the dialog object from. */
58     public static final String JavaDoc PARAM_CLASSNAME = "classname";
59
60     /** Request parameter for the class name to get the dialog object from. */
61     private String JavaDoc m_paramClassname;
62
63     /**
64      * Public constructor with JSP action element.<p>
65      *
66      * @param jsp an initialized JSP action element
67      */

68     public CmsDatabaseExportReport(CmsJspActionElement jsp) {
69
70         super(jsp);
71     }
72
73     /**
74      * Public constructor with JSP variables.<p>
75      *
76      * @param context the JSP page context
77      * @param req the JSP request
78      * @param res the JSP response
79      */

80     public CmsDatabaseExportReport(PageContext JavaDoc context, HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) {
81
82         this(new CmsJspActionElement(context, req, res));
83     }
84
85     /**
86      * Returns the request parameter value for the class name to get the dialog object from.<p>
87      *
88      * @return the request parameter value for the class name to get the dialog object from
89      */

90     public String JavaDoc getParamClassname() {
91
92         return m_paramClassname;
93     }
94
95     /**
96      *
97      * @see org.opencms.workplace.list.A_CmsListReport#initializeThread()
98      */

99     public I_CmsReportThread initializeThread() {
100
101         CmsVfsImportExportHandler vfsExportHandler = (CmsVfsImportExportHandler)((Map JavaDoc)getSettings().getDialogObject()).get(getParamClassname());
102
103         I_CmsReportThread exportThread = new CmsExportThread(getCms(), vfsExportHandler, false);
104
105         return exportThread;
106     }
107
108     /**
109      * Sets the request parameter value for the class name to get the dialog object from.<p>
110      *
111      * @param className the request parameter value for the class name to get the dialog object from
112      */

113     public void setParamClassname(String JavaDoc className) {
114
115         m_paramClassname = className;
116     }
117
118 }
Popular Tags