KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > importexport > I_CmsImport


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/importexport/I_CmsImport.java,v $
3  * Date : $Date: 2005/06/26 15:35:13 $
4  * Version: $Revision: 1.16 $
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.importexport;
33
34 import org.opencms.file.CmsObject;
35 import org.opencms.report.I_CmsReport;
36
37 import java.io.File JavaDoc;
38 import java.util.zip.ZipFile JavaDoc;
39
40 import org.dom4j.Document;
41
42 /**
43  * This interface describes a import class which is used to import resources into the VFS.<p>
44  *
45  * OpenCms supports different import versions, for each version a own import class must be implemented.
46  * A group of common used methods can be found in <code>{@link org.opencms.importexport.A_CmsImport}</code>.<p>
47  *
48  * @author Michael Emmerich
49  * @author Thomas Weckert
50  *
51  * @version $Revision: 1.16 $
52  *
53  * @since 6.0.0
54  */

55 public interface I_CmsImport {
56
57     /**
58      * Returns the version of the import implementation.<p>
59      *
60      * <ul>
61      * <li>0 indicates an export file without a version number, that is before version 4.3.23 of OpenCms</li>
62      * <li>1 indicates an export file of OpenCms with a version before 5.0.0</li>
63      * <li>2 indicates an export file of OpenCms with a version before 5.1.2</li>
64      * <li>3 indicates an export file of OpenCms with a version before 5.1.6</li>
65      * <li>4 indicates an export file of OpenCms with a version after 5.1.6</li>
66      * </ul>
67      *
68      * @return the version of the import implementation
69      */

70     int getVersion();
71
72     /**
73      * Imports the resources.<p>
74      *
75      * @param cms the current users OpenCms context
76      * @param importPath the path in the OpenCms VFS to import into
77      * @param report a report object to output the progress information to
78      * @param importResource the import-resource (folder) to load resources from
79      * @param importZip the import-resource (zip) to load resources from
80      * @param docXml the <code>manifest.xml</code> file which contains the meta information of the imported files
81      *
82      * @throws CmsImportExportException if something goes wrong
83      */

84     void importResources(
85         CmsObject cms,
86         String JavaDoc importPath,
87         I_CmsReport report,
88         File JavaDoc importResource,
89         ZipFile JavaDoc importZip,
90         Document docXml) throws CmsImportExportException;
91 }
Popular Tags