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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cmsimportversion4.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/importexport/CmsImportVersion4.java,v $
 * Date   : $Date: 2006/03/27 14:52:53 $
 * Version: $Revision: 1.87 $
 *
 * 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.CmsObject;
import org.opencms.file.CmsResource;
import org.opencms.file.types.I_CmsResourceType;
import org.opencms.i18n.CmsMessageContainer;
import org.opencms.main.CmsException;
import org.opencms.main.CmsLog;
import org.opencms.main.OpenCms;
import org.opencms.report.I_CmsReport;
import org.opencms.security.CmsRole;
import org.opencms.security.I_CmsPasswordHandler;
import org.opencms.security.I_CmsPrincipal;
import org.opencms.util.CmsDateUtil;
import org.opencms.util.CmsUUID;

import java.io.File;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipFile;

import org.apache.commons.logging.Log;

import org.dom4j.Document;
import org.dom4j.Element;

/**
 * Implementation of the OpenCms Import Interface ({@link org.opencms.importexport.I_CmsImport}) for 
 * the import version 4.<p>
 * 
 * This import format is used in OpenCms since 5.1.6.<p>
 *
 * @author Michael Emmerich 
 * @author Thomas Weckert  
 * 
 * @version $Revision: 1.87 $ 
 * 
 * @since 6.0.0 
 * 
 * @see org.opencms.importexport.A_CmsImport
 */
public class CmsImportVersion4 extends A_CmsImport {

    /** The version number of this import implementation.<p> */
    private static final int IMPORT_VERSION = 4;

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

    /**
     * Creates a new CmsImportVerion4 object.<p>
     */
    public CmsImportVersion4() {

        m_convertToXmlPage = true;
    }

    /**
     * @see org.opencms.importexport.I_CmsImport#getVersion()
     * @return the version number of this import implementation
     */
    public int getVersion() {

        return CmsImportVersion4.IMPORT_VERSION;
    }

    /**
     * @see org.opencms.importexport.I_CmsImport#importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document)
     */
    public void importResources(
        CmsObject cms,
        String importPath,
        I_CmsReport report,
        File importResource,
        ZipFile importZip,
        Document docXml) throws CmsImportExportException {

        // initialize the import       
        initialize();
        m_cms = cms;
        m_importPath = importPath;
        m_report = report;
        m_importResource = importResource;
        m_importZip = importZip;
        m_docXml = docXml;
        m_importingChannelData = false;
        m_linkStorage = new HashMap();
        m_linkPropertyStorage = new HashMap();

        try {
            // first import the user information
            if (cms.hasRole(CmsRole.ACCOUNT_MANAGER)) {
                importGroups();
                importUsers();
            }
            // now import the VFS resources
            readResourcesFromManifest();
            convertPointerToSiblings();
        } finally {
            cleanUp();
        }
    }

    /**
     * Imports a single user.<p>
     * @param name user name
     * @param description user description
     * @param flags user flags
     * @param password user password 
     * @param firstname firstname of the user
     * @param lastname lastname of the user
     * @param email user email
     * @param address user address 
     * @param type user type
     * @param userInfo user info
     * @param userGroups user groups
     * 
     * @throws CmsImportExportException in case something goes wrong
     */
    protected void importUser(
        String name,
        String description,
        String flags,
        String password,
        String firstname,
        String lastname,
        String email,
        String address,
        String type,
        Map userInfo,
        List userGroups) throws CmsImportExportException {

        boolean convert = false;

        Map config = OpenCms.getPasswordHandler().getConfiguration();
        if (config != null && config.containsKey(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING)) {
            convert = Boolean.valueOf((String)config.get(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING)).booleanValue();
        }

        if (convert) {
            password = convertDigestEncoding(password);
        }

        super.importUser(
            name,
            description,
            flags,
            password,
            firstname,
            lastname,
            email,
            address,
            type,
            userInfo,
            userGroups);
    }

    /**
     * Convert a given timestamp from a String format to a long value.<p>
     * 
     * The timestamp is either the string representation of a long value (old export format)
     * or a user-readable string format.
     * 
     * @param timestamp timestamp to convert
     * @return long value of the timestamp
     */
    private long convertTimestamp(String timestamp) {

        long value = 0;
        // try to parse the timestamp string
        // if it successes, its an old style long value
        try {
            value = Long.parseLong(timestamp);

        } catch (NumberFormatException e) {
            // the timestamp was in in a user-readable string format, create the long value form it
            try {
                value = CmsDateUtil.parseHeaderDate(timestamp);
            } catch (ParseException pe) {
                value = System.currentTimeMillis();
            }
        }
        return value;
    }

    /**
     * Imports a resource (file or folder) into the cms.<p>
     * 
     * @param source the path to the source-file
     * @param destination the path to the destination-file in the cms
     * @param type the resource type name of the file
     * @param uuidresource  the resource uuid of the resource
     * @param datelastmodified the last modification date of the resource
     * @param userlastmodified the user who made the last modifications to the resource
     * @param datecreated the creation date of the resource
     * @param usercreated the user who created 
     * @param datereleased the release date of the resource
     * @param dateexpired the expire date of the resource
     * @param flags the flags of the resource     
     * @param properties a list with properties for this resource
     * 
     * @return imported resource
     */
    private CmsResource importResource(
        String source,
        String destination,
        I_CmsResourceType type,
        String uuidresource,
        long datelastmodified,
        String userlastmodified,
        long datecreated,
        String usercreated,
        long datereleased,
        long dateexpired,
        String flags,
        List properties) {

        byte[] content = null;
        CmsResource result = null;

        try {

            // get the file content
            if (source != null) {
                content = getFileBytes(source);
            }
            int size = 0;
            if (content != null) {
                size = content.length;
            }

            // get UUIDs for the user   
            CmsUUID newUserlastmodified;
            CmsUUID newUsercreated;
            // check if user created and user lastmodified are valid users in this system.
            // if not, use the current user
            try {
                newUserlastmodified = m_cms.readUser(userlastmodified).getId();
            } catch (CmsException e) {
                newUserlastmodified = m_cms.getRequestContext().currentUser().getId();
                // datelastmodified = System.currentTimeMillis();
            }

            try {
                newUsercreated = m_cms.readUser(usercreated).getId();
            } catch (CmsException e) {
                newUsercreated = m_cms.getRequestContext().currentUser().getId();
                // datecreated = System.currentTimeMillis();
            }

            // get UUIDs for the resource and content        
            CmsUUID newUuidresource = null;
            if ((uuidresource != null) && (!type.isFolder())) {
                // create a UUID from the provided string
                newUuidresource = new CmsUUID(uuidresource);
            } else {
                // folders get always a new resource record UUID
                newUuidresource = new CmsUUID();
            }

            // create a new CmsResource                         
            CmsResource resource = new CmsResource(
                new CmsUUID(), // structure ID is always a new UUID
                newUuidresource,
                destination,
                type.getTypeId(),
                type.isFolder(),
                new Integer(flags).intValue(),
                m_cms.getRequestContext().currentProject().getId(),
                CmsResource.STATE_NEW,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品日韩99亚洲| 一本色道亚洲精品aⅴ| 麻豆视频一区二区| 免费在线观看日韩欧美| 成人综合日日夜夜| 99久久精品国产一区| 欧美日韩视频在线观看一区二区三区| 欧洲色大大久久| 欧美videofree性高清杂交| 日韩高清电影一区| 97精品电影院| 一区二区三区在线观看国产| 精品在线播放午夜| 91免费在线视频观看| 久久综合色天天久久综合图片| 亚洲少妇最新在线视频| 久久精品国产成人一区二区三区| 91国内精品野花午夜精品| 精品福利一区二区三区| 丝袜诱惑亚洲看片| 色婷婷av一区二区三区之一色屋| 亚洲一卡二卡三卡四卡无卡久久| 懂色av中文字幕一区二区三区| 日韩免费观看2025年上映的电影| 亚洲自拍与偷拍| 欧美一区二区三区视频在线| 亚洲国产精品欧美一二99| 国产成a人亚洲| 亚洲激情综合网| 97久久超碰精品国产| 亚洲大片一区二区三区| 在线观看日韩av先锋影音电影院| 日本怡春院一区二区| 欧美国产日韩精品免费观看| 国产在线乱码一区二区三区| 欧美一级黄色片| 日本欧洲一区二区| 国产精品视频线看| 成人精品gif动图一区| 国产精品视频九色porn| 欧美乱妇一区二区三区不卡视频| 亚洲6080在线| 国产女同性恋一区二区| 成人18视频日本| 日韩成人精品在线| 亚洲男帅同性gay1069| 91理论电影在线观看| 麻豆91在线观看| 亚洲永久精品国产| 国产精品麻豆网站| 日韩精品最新网址| 欧美午夜不卡在线观看免费| 日欧美一区二区| 亚洲婷婷综合久久一本伊一区| 日韩精品一区二区三区视频播放| 色婷婷综合久久久中文字幕| 国产不卡一区视频| 韩日av一区二区| 日韩在线播放一区二区| 一区二区三区在线播放| 国产欧美日韩精品一区| 精品国产一区二区三区av性色| 欧美日韩综合在线免费观看| 91香蕉国产在线观看软件| 国产成人精品免费视频网站| 一区二区三区欧美久久| 中文字幕国产精品一区二区| 精品美女被调教视频大全网站| 欧美精品xxxxbbbb| 欧美日韩视频在线第一区| 色av成人天堂桃色av| 99国产精品国产精品毛片| 粉嫩绯色av一区二区在线观看| 久久不见久久见免费视频1| 日韩成人午夜精品| 丝袜诱惑制服诱惑色一区在线观看| 亚洲线精品一区二区三区| 亚洲精品ww久久久久久p站| 日韩久久一区二区| 一区二区成人在线| 亚洲成人先锋电影| 日韩高清不卡在线| 日本不卡在线视频| 久久精品国产成人一区二区三区| 久久不见久久见中文字幕免费| 精品无人区卡一卡二卡三乱码免费卡| 久久成人麻豆午夜电影| 精品一区二区在线看| 久久99国内精品| 国产精品一色哟哟哟| 亚洲成人动漫在线免费观看| 亚洲成a人在线观看| 亚洲成人你懂的| 五月天精品一区二区三区| 国产精品久久久久国产精品日日| 欧美日韩在线精品一区二区三区激情 | 美女视频免费一区| 精品一区二区免费| 国产jizzjizz一区二区| 99在线精品一区二区三区| 久色婷婷小香蕉久久| 久久99精品久久久久久国产越南| 国内精品久久久久影院薰衣草| 国产精品一区免费视频| 99在线视频精品| 欧美伊人久久大香线蕉综合69 | 欧美日韩精品一区二区三区蜜桃| 成人动漫中文字幕| 色婷婷综合久色| 日韩精品一区二区三区中文不卡 | 久久精品一区二区三区四区| 91精品国产综合久久福利软件| 精品日产卡一卡二卡麻豆| 国产精品美女久久久久高潮| 亚洲图片欧美视频| 久久99国产精品免费| 不卡一区二区三区四区| 欧美日韩国产美| 欧美国产一区在线| 日韩和欧美一区二区| 东方欧美亚洲色图在线| 精品视频一区 二区 三区| 精品999久久久| 亚洲主播在线播放| 国产精品一区在线观看你懂的| 一本到高清视频免费精品| 欧美一区二区三区电影| 亚洲人亚洲人成电影网站色| 蜜乳av一区二区| 在线观看av一区| 久久色成人在线| 亚洲午夜免费视频| 成人av在线观| 日韩一级片在线观看| 亚洲日本护士毛茸茸| 国产乱子伦视频一区二区三区| 欧美撒尿777hd撒尿| 中文字幕一区av| 亚洲人吸女人奶水| 国产精品1区二区.| 91精品国产91久久久久久一区二区| 国产真实乱对白精彩久久| 欧美系列日韩一区| 日韩毛片一二三区| 国产iv一区二区三区| www成人在线观看| 奇米精品一区二区三区在线观看| 在线观看日韩精品| 亚洲免费视频成人| 99久久久国产精品免费蜜臀| 久久精品人人爽人人爽| 美国十次了思思久久精品导航| 在线观看精品一区| 亚洲欧洲在线观看av| 成人性生交大片| 国产欧美一区二区三区鸳鸯浴 | 亚洲九九爱视频| 成人99免费视频| 国产丝袜美腿一区二区三区| 经典三级在线一区| 精品日韩欧美一区二区| 蜜桃视频在线一区| 欧美一区二区三区在线| 日韩av高清在线观看| 欧美美女黄视频| 日韩精品成人一区二区在线| 欧洲中文字幕精品| 亚洲成人av免费| 欧美午夜精品一区二区蜜桃| 亚洲一区二区三区四区五区黄| 在线视频一区二区三区| 一区二区三区在线观看欧美| 在线观看中文字幕不卡| 亚洲制服丝袜av| 欧美日韩在线三级| 日韩av不卡在线观看| 日韩亚洲欧美成人一区| 蜜桃精品在线观看| 久久久久久久网| 亚洲电影视频在线| 欧美绝品在线观看成人午夜影视 | 蜜桃视频一区二区三区 | 欧美视频三区在线播放| 午夜欧美大尺度福利影院在线看| 欧美日本精品一区二区三区| 亚洲午夜日本在线观看| 欧美一区二区三区小说| 韩国一区二区视频| 国产精品亲子伦对白| 色综合咪咪久久| 日韩不卡在线观看日韩不卡视频| 欧美一区二区三区婷婷月色| 国产一二精品视频| 67194成人在线观看| 亚洲精选免费视频| 欧美午夜在线观看| 麻豆极品一区二区三区| 中文欧美字幕免费| 欧美日韩中文一区| 国内久久婷婷综合|