亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cmsexport.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/*
 * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/importexport/CmsExport.java,v $
 * Date   : $Date: 2006/03/27 14:52:54 $
 * Version: $Revision: 1.84 $
 *
 * 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.importexport;

import org.opencms.file.CmsFile;
import org.opencms.file.CmsFolder;
import org.opencms.file.CmsGroup;
import org.opencms.file.CmsObject;
import org.opencms.file.CmsProperty;
import org.opencms.file.CmsResource;
import org.opencms.file.CmsResourceFilter;
import org.opencms.file.CmsUser;
import org.opencms.file.CmsVfsException;
import org.opencms.i18n.CmsMessageContainer;
import org.opencms.loader.CmsLoaderException;
import org.opencms.main.CmsEvent;
import org.opencms.main.CmsException;
import org.opencms.main.CmsLog;
import org.opencms.main.I_CmsEventListener;
import org.opencms.main.OpenCms;
import org.opencms.report.CmsShellReport;
import org.opencms.report.I_CmsReport;
import org.opencms.security.CmsAccessControlEntry;
import org.opencms.security.CmsRole;
import org.opencms.security.CmsRoleViolationException;
import org.opencms.util.CmsDateUtil;
import org.opencms.util.CmsFileUtil;
import org.opencms.util.CmsUUID;
import org.opencms.util.CmsXmlSaxWriter;
import org.opencms.workplace.CmsWorkplace;

import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.logging.Log;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.SAXWriter;
import org.xml.sax.SAXException;

/**
 * Provides the functionality to export files from the OpenCms VFS to a ZIP file.<p>
 * 
 * The ZIP file written will contain a copy of all exported files with their contents.
 * It will also contain a <code>manifest.xml</code> file in wich all meta-information 
 * about this files are stored, like permissions etc.<p>
 *
 * @author Alexander Kandzior 
 * @author Michael Emmerich 
 * 
 * @version $Revision: 1.84 $ 
 * 
 * @since 6.0.0 
 */
public class CmsExport {

    /** The log object for this class. */
    private static final Log LOG = CmsLog.getLog(CmsExport.class);

    private static final int SUB_LENGTH = 4096;

    /** The CmsObject to do the operations. */
    private CmsObject m_cms;

    /** Max file age of contents to export. */
    private long m_contentAge;

    /** Counter for the export. */
    private int m_exportCount;

    /** Set of all exported pages, required for later page body file export. */
    private Set m_exportedPageFiles;

    /** Set of all exported files, required for later page body file export. */
    private Set m_exportedResources;

    /** The export ZIP file to store resources in. */
    private String m_exportFileName;

    /** Indicates if the user data and group data should be included to the export. */
    private boolean m_exportUserdata;

    /** Indicates if the webuser data should be included to the export. */
    private boolean m_exportWebusers;

    /** The export ZIP stream to write resources to. */
    private ZipOutputStream m_exportZipStream;

    /** Indicates if the system should be included to the export. */
    private boolean m_includeSystem;

    /** Indicates if the unchanged resources should be included to the export .*/
    private boolean m_includeUnchanged;

    /** Recursive flag, if set the folders are exported recursively. */
    private boolean m_recursive;

    /** The report for the log messages. */
    private I_CmsReport m_report;

    /** The top level file node where all resources are appended to. */
    private Element m_resourceNode;

    /** The SAX writer to write the output to. */
    private SAXWriter m_saxWriter;

    /** Cache for previously added super folders. */
    private List m_superFolders;

    /**
     * Constructs a new uninitialized export, required for special subclass data export.<p>
     */
    public CmsExport() {

        // empty constructor
    }

    /**
     * Constructs a new export.<p>
     *
     * @param cms the cmsObject to work with
     * @param exportFile the file or folder to export to
     * @param resourcesToExport the paths of folders and files to export
     * @param includeSystem if true, the system folder is included
     * @param includeUnchanged <code>true</code>, if unchanged files should be included
     * @throws CmsImportExportException if something goes wrong
     * @throws CmsRoleViolationException if the current user has not the required role
     */
    public CmsExport(
        CmsObject cms,
        String exportFile,
        List resourcesToExport,
        boolean includeSystem,
        boolean includeUnchanged)
    throws CmsImportExportException, CmsRoleViolationException {

        this(cms, exportFile, resourcesToExport, includeSystem, includeUnchanged, null, false, 0, new CmsShellReport(
            cms.getRequestContext().getLocale()));
    }

    /**
     * Constructs a new export.<p>
     *
     * @param cms the cmsObject to work with
     * @param exportFile the file or folder to export to
     * @param resourcesToExport the paths of folders and files to export
     * @param includeSystem if true, the system folder is included
     * @param includeUnchanged <code>true</code>, if unchanged files should be included
     * @param moduleElement module informations in a Node for module export
     * @param exportUserdata if true, the user and group data will also be exported
     * @param exportWebusers if true, the webuser data will also be exported
     * @param contentAge export contents changed after this date/time
     * @param report to handle the log messages
     * @param recursive recursive flag
     * 
     * @throws CmsImportExportException if something goes wrong
     * @throws CmsRoleViolationException if the current user has not the required role
     */
    public CmsExport(
        CmsObject cms,
        String exportFile,
        List resourcesToExport,
        boolean includeSystem,
        boolean includeUnchanged,
        Element moduleElement,
        boolean exportUserdata,
        boolean exportWebusers,
        long contentAge,
        I_CmsReport report,
        boolean recursive)
    throws CmsImportExportException, CmsRoleViolationException {

        setCms(cms);
        setReport(report);
        setExportFileName(exportFile);

        // check if the user has the required permissions
        cms.checkRole(CmsRole.EXPORT_DATABASE);

        m_includeSystem = includeSystem;
        m_includeUnchanged = includeUnchanged;
        m_exportUserdata = exportUserdata;
        m_exportWebusers = exportWebusers;
        m_contentAge = contentAge;
        m_exportCount = 0;
        m_recursive = recursive;

        // clear all caches
        report.println(Messages.get().container(Messages.RPT_CLEARCACHE_0), I_CmsReport.FORMAT_NOTE);
        OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, Collections.EMPTY_MAP));

        try {
            Element exportNode = openExportFile();

            if (moduleElement != null) {
                // add the module element
                exportNode.add(moduleElement);
                // write the XML
                digestElement(exportNode, moduleElement);
            }

            exportAllResources(exportNode, resourcesToExport);

            // export userdata and groupdata if selected
            if (m_exportUserdata || m_exportWebusers) {
                Element userGroupData = exportNode.addElement(CmsImportExportManager.N_USERGROUPDATA);
                getSaxWriter().writeOpen(userGroupData);

                exportGroups(userGroupData);
                exportUsers(userGroupData);

                getSaxWriter().writeClose(userGroupData);
                exportNode.remove(userGroupData);
            }

            closeExportFile(exportNode);
        } catch (SAXException se) {
            getReport().println(se);

            CmsMessageContainer message = Messages.get().container(
                Messages.ERR_IMPORTEXPORT_ERROR_EXPORTING_TO_FILE_1,
                getExportFileName());
            if (LOG.isDebugEnabled()) {
                LOG.debug(message.key(), se);
            }

            throw new CmsImportExportException(message, se);
        } catch (IOException ioe) {
            getReport().println(ioe);

            CmsMessageContainer message = Messages.get().container(
                Messages.ERR_IMPORTEXPORT_ERROR_EXPORTING_TO_FILE_1,
                getExportFileName());
            if (LOG.isDebugEnabled()) {
                LOG.debug(message.key(), ioe);
            }

            throw new CmsImportExportException(message, ioe);
        }
    }

    /**
     * Constructs a new export.<p>
     *
     * @param cms the cmsObject to work with
     * @param exportFile the file or folder to export to
     * @param resourcesToExport the paths of folders and files to export
     * @param includeSystem if true, the system folder is included
     * @param includeUnchanged <code>true</code>, if unchanged files should be included
     * @param moduleElement module informations in a Node for module export
     * @param exportUserdata if true, the user and grou pdata will also be exported
     * @param contentAge export contents changed after this date/time
     * @param report to handle the log messages
     * 
     * @throws CmsImportExportException if something goes wrong
     * @throws CmsRoleViolationException if the current user has not the required role
     */
    public CmsExport(
        CmsObject cms,
        String exportFile,
        List resourcesToExport,
        boolean includeSystem,
        boolean includeUnchanged,
        Element moduleElement,
        boolean exportUserdata,
        long contentAge,
        I_CmsReport report)
    throws CmsImportExportException, CmsRoleViolationException {

        this(
            cms,
            exportFile,
            resourcesToExport,
            includeSystem,
            includeUnchanged,
            moduleElement,
            exportUserdata,
            contentAge,
            report,
            true);
    }

    /**
     * Constructs a new export.<p>
     *
     * @param cms the cmsObject to work with
     * @param exportFile the file or folder to export to
     * @param resourcesToExport the paths of folders and files to export
     * @param includeSystem if true, the system folder is included
     * @param includeUnchanged <code>true</code>, if unchanged files should be included
     * @param moduleElement module informations in a Node for module export
     * @param exportUserdata if true, the user and grou pdata will also be exported
     * @param contentAge export contents changed after this date/time
     * @param report to handle the log messages
     * @param recursive recursive flag
     * 
     * @throws CmsImportExportException if something goes wrong
     * @throws CmsRoleViolationException if the current user has not the required role
     */
    public CmsExport(
        CmsObject cms,
        String exportFile,
        List resourcesToExport,
        boolean includeSystem,
        boolean includeUnchanged,
        Element moduleElement,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
风间由美一区二区三区在线观看| 欧美经典一区二区| 欧美日韩一区二区三区免费看| 国产精品国产自产拍高清av王其| 福利一区二区在线| 国产麻豆精品视频| 中文字幕一区三区| 欧美精品在线一区二区| 久久99国内精品| 一区在线观看免费| 国产精品乱人伦| 欧美一级在线观看| av在线播放成人| 一区二区高清在线| 91精品国产高清一区二区三区蜜臀 | 中文字幕亚洲视频| 中文字幕中文字幕一区| 综合欧美亚洲日本| 欧美成人在线直播| 成+人+亚洲+综合天堂| 日韩精品一区第一页| 久久综合五月天婷婷伊人| 91亚洲大成网污www| 精品一区二区日韩| 成人妖精视频yjsp地址| 麻豆精品一区二区av白丝在线| 国产精品午夜春色av| 一区二区三区在线观看网站| 日韩精品电影在线| 国产成人自拍高清视频在线免费播放| 五月天丁香久久| 亚洲精品ww久久久久久p站| 国产欧美日韩不卡| 亚洲欧美偷拍三级| 日韩一区有码在线| 日韩精品色哟哟| 国产精品18久久久久久久久| 精品一区二区精品| 91视视频在线观看入口直接观看www | 亚洲视频一区在线观看| 亚洲成人动漫一区| 亚洲精品v日韩精品| 久久国产欧美日韩精品| 日韩高清一级片| 五月激情六月综合| 丰满白嫩尤物一区二区| 欧美精品黑人性xxxx| 国产欧美日韩视频在线观看| 丝袜美腿亚洲综合| 成人美女在线视频| 精品国产91亚洲一区二区三区婷婷 | 国产精品久线观看视频| 日韩精品电影一区亚洲| 日本高清免费不卡视频| 色综合一区二区| av电影天堂一区二区在线观看| 9191精品国产综合久久久久久| 91麻豆精品国产| 亚洲摸摸操操av| 国产成人在线影院| 久久综合九色综合久久久精品综合| 一级日本不卡的影视| 成人手机电影网| 久久综合色婷婷| 麻豆极品一区二区三区| 777欧美精品| 日韩中文字幕麻豆| 欧美丝袜丝交足nylons| 精品日产卡一卡二卡麻豆| 亚洲第一综合色| 欧美日韩一级黄| 香蕉影视欧美成人| 欧美日本国产视频| 精品欧美乱码久久久久久1区2区| 亚洲影院在线观看| 国内精品久久久久影院色| 91免费国产在线| 亚洲欧洲美洲综合色网| 福利一区二区在线观看| 亚洲欧洲另类国产综合| 波多野结衣在线一区| 中文字幕中文字幕在线一区| 91丨九色丨蝌蚪丨老版| 亚洲天堂av一区| 91浏览器在线视频| 一区二区三区四区视频精品免费| 日本久久一区二区三区| 亚洲妇熟xx妇色黄| 处破女av一区二区| 亚洲日本电影在线| 欧美喷水一区二区| 精品一区二区三区免费| 国产欧美一区二区精品久导航 | 在线中文字幕一区二区| 亚洲国产精品一区二区www| 6080亚洲精品一区二区| 午夜精品爽啪视频| 精品国产凹凸成av人导航| 成人性生交大片免费看中文 | 一本色道久久综合亚洲aⅴ蜜桃 | 精品午夜久久福利影院| 国产亚洲婷婷免费| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩欧美在线网站| 日韩高清在线观看| 国产肉丝袜一区二区| 91在线porny国产在线看| 日韩高清一级片| 欧美国产成人在线| 欧美美女一区二区三区| 国产露脸91国语对白| 亚洲精品国产一区二区三区四区在线| 51精品视频一区二区三区| 国产99久久久国产精品潘金 | 色综合咪咪久久| 秋霞电影一区二区| 欧美片网站yy| eeuss鲁片一区二区三区在线观看| 亚洲一区二区三区不卡国产欧美| 2021久久国产精品不只是精品| 97se亚洲国产综合自在线不卡 | 一区二区欧美国产| 精品欧美乱码久久久久久 | 精品久久久久久久久久久久久久久久久 | 中文字幕一区免费在线观看 | av网站免费线看精品| 日韩成人一级大片| 尤物av一区二区| 成人免费在线视频| 久久久亚洲午夜电影| 国产米奇在线777精品观看| 一区二区三区四区精品在线视频| 久久精品一区二区三区不卡牛牛| 欧美日韩成人在线| 99综合影院在线| 福利一区二区在线观看| 国产尤物一区二区在线| 日韩精品福利网| 亚洲午夜国产一区99re久久| 国产精品久久久久久久久搜平片 | 成人免费av网站| 国产一区美女在线| 久久精品国产亚洲aⅴ| 午夜伊人狠狠久久| 亚洲一区二区影院| 亚洲午夜国产一区99re久久| 亚洲女人****多毛耸耸8| 欧美激情在线观看视频免费| 久久综合色8888| 精品国产乱码久久久久久牛牛| 欧美二区三区91| 欧美日韩视频在线第一区| 在线观看精品一区| 蜜臀av一区二区在线免费观看| 图片区小说区国产精品视频| 亚洲一区二区五区| 亚洲国产你懂的| 五月天视频一区| 亚洲成人av中文| 亚洲第四色夜色| 日本在线不卡视频| 狂野欧美性猛交blacked| 免费欧美日韩国产三级电影| 美美哒免费高清在线观看视频一区二区 | 成人午夜视频在线观看| 成人天堂资源www在线| 成人网在线免费视频| 99精品国产视频| 欧洲人成人精品| 在线播放中文字幕一区| 日韩三区在线观看| 国产香蕉久久精品综合网| 国产午夜精品美女毛片视频| 亚洲国产精品国自产拍av| 亚洲欧洲日韩在线| 亚洲综合色视频| 青青草原综合久久大伊人精品| 久久精品国产久精国产爱| 国产精品综合网| 91浏览器在线视频| 欧美人牲a欧美精品| 久久综合九色综合欧美98| 中文字幕一区二区三区在线播放| 亚洲一区二区三区在线看| 日产精品久久久久久久性色| 国产成人午夜电影网| 色狠狠一区二区| 精品国产123| 亚洲免费在线电影| 麻豆精品在线看| 99视频在线精品| 欧美一级日韩免费不卡| 中文字幕免费一区| 日韩中文字幕91| av欧美精品.com| 欧美岛国在线观看| 精品三级av在线| 亚洲精品日产精品乱码不卡| 韩国v欧美v亚洲v日本v| 在线亚洲精品福利网址导航|