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

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

?? cmssetupbean.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/*
 * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/setup/CmsSetupBean.java,v $
 * Date   : $Date: 2006/07/20 11:06:50 $
 * Version: $Revision: 1.48 $
 *
 * 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.setup;

import org.opencms.configuration.CmsConfigurationException;
import org.opencms.configuration.CmsConfigurationManager;
import org.opencms.configuration.CmsImportExportConfiguration;
import org.opencms.configuration.CmsModuleConfiguration;
import org.opencms.configuration.CmsSearchConfiguration;
import org.opencms.configuration.CmsSystemConfiguration;
import org.opencms.configuration.CmsVfsConfiguration;
import org.opencms.configuration.CmsWorkplaceConfiguration;
import org.opencms.configuration.I_CmsXmlConfiguration;
import org.opencms.db.CmsDbPool;
import org.opencms.file.CmsObject;
import org.opencms.file.CmsResource;
import org.opencms.i18n.CmsEncoder;
import org.opencms.loader.CmsImageLoader;
import org.opencms.main.CmsLog;
import org.opencms.main.CmsRuntimeException;
import org.opencms.main.CmsShell;
import org.opencms.main.CmsSystemInfo;
import org.opencms.main.I_CmsShellCommands;
import org.opencms.main.Messages;
import org.opencms.main.OpenCms;
import org.opencms.main.OpenCmsServlet;
import org.opencms.module.CmsModule;
import org.opencms.module.CmsModuleManager;
import org.opencms.report.CmsShellReport;
import org.opencms.setup.comptest.CmsSetupTestResult;
import org.opencms.setup.comptest.CmsSetupTestSimapi;
import org.opencms.setup.comptest.I_CmsSetupTest;
import org.opencms.setup.xml.CmsSetupXmlHelper;
import org.opencms.util.CmsFileUtil;
import org.opencms.util.CmsPropertyUtils;
import org.opencms.util.CmsStringUtil;
import org.opencms.util.CmsUUID;
import org.opencms.xml.CmsXmlException;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.Vector;

import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;

import org.apache.commons.collections.ExtendedProperties;

/**
 * A java bean as a controller for the OpenCms setup wizard.<p>
 * 
 * It is not allowed to customize this bean with methods for a specific database server setup!<p>
 * 
 * Database server specific settings should be set/read using get/setDbProperty, as for example like:
 * 
 * <pre>
 * setDbProperty("oracle.defaultTablespace", value);
 * </pre>
 * <p>
 *
 * @author Thomas Weckert  
 * @author Carsten Weinholz 
 * @author Alexander Kandzior
 * @author Michael Moossen 
 * 
 * @version $Revision: 1.48 $ 
 * 
 * @since 6.0.0 
 */
public class CmsSetupBean extends Object implements Cloneable, I_CmsShellCommands {

    /** Folder constant name.<p> */
    public static final String FOLDER_BACKUP = "backup" + File.separatorChar;

    /** Folder constant name.<p> */
    public static final String FOLDER_DATABASE = "database" + File.separatorChar;

    /** Folder constant name.<p> */
    public static final String FOLDER_LIB = "lib" + File.separatorChar;

    /** Folder constant name.<p> */
    public static final String FOLDER_SETUP = "setup" + File.separatorChar;

    /** Folder constant name.<p> */
    public static final String FOLDER_WEBINF = "WEB-INF" + File.separatorChar;

    /** DB provider constant. */
    public static final String GENERIC_PROVIDER = "generic";

    /** Name of the property file containing HTML fragments for setup wizard and error dialog. */
    public static final String HTML_MESSAGE_FILE = "org/opencms/setup/htmlmsg.properties";

    /** DB provider constant for maxdb. */
    public static final String MAXDB_PROVIDER = "maxdb";

    /** DB provider constant for mysql. */
    public static final String MYSQL_PROVIDER = "mysql";

    /** DB provider constant for oracle. */
    public static final String ORACLE_PROVIDER = "oracle";

    /** DB provider constant for postgresql. */
    public static final String POSTGRESQL_PROVIDER = "postgresql";

    /** Required files per database server setup. */
    public static final String[] REQUIRED_DB_SETUP_FILES = {
        "step_4_database_setup.jsp",
        "database.properties",
        "create_db.sql",
        "create_tables.sql",
        "drop_db.sql",
        "drop_tables.sql"};

    /** Contains HTML fragments for the output in the JSP pages of the setup wizard. */
    private static Properties m_htmlProps;

    /** A map with all available modules. */
    protected Map m_availableModules;

    /** A CmsObject to execute shell commands. */
    protected CmsObject m_cms;

    /** A list with the package names of the modules to be installed .*/
    protected List m_installModules;

    /** Location for log file.  */
    protected String m_logFile = FOLDER_WEBINF + CmsLog.FOLDER_LOGS + "setup.log";

    /** Location for logs relative to the webapp folder.  */
    protected String m_logsFolder = FOLDER_WEBINF + CmsLog.FOLDER_LOGS;

    /** A map with lists of dependent module package names keyed by module package names. */
    protected Map m_moduleDependencies;

    /** A map with all available modules filenames. */
    protected Map m_moduleFilenames;

    /** Location for module archives relative to the webapp folder.  */
    protected String m_modulesFolder = FOLDER_WEBINF + CmsSystemInfo.FOLDER_PACKAGES + CmsSystemInfo.FOLDER_MODULES;

    /** The new logging offset in the workplace import thread. */
    protected int m_newLoggingOffset;

    /** The lod logging offset in the workplace import thread. */
    protected int m_oldLoggingOffset;

    /** The absolute path to the home directory of the OpenCms webapp. */
    protected String m_webAppRfsPath;

    /** The absolute path to the config sub directory of the OpenCms web application. */
    private String m_configRfsPath;

    /** Key of the selected database server (e.g. "mysql", "generic" or "oracle") */
    private String m_databaseKey;

    /** List of keys of all available database server setups (e.g. "mysql", "generic" or "oracle") */
    private List m_databaseKeys;

    /** Map of database setup properties of all available database server setups keyed by their database keys. */
    private Map m_databaseProperties;

    /** Password used for the JDBC connection when the OpenCms database is created. */
    private String m_dbCreatePwd;

    /** The name of the default web application (in web.xml). */
    private String m_defaultWebApplication;

    /** Contains the error messages to be displayed in the setup wizard. */
    private List m_errors;

    /** Contains the properties of "opencms.properties". */
    private ExtendedProperties m_extProperties;

    /** The Database Provider used in setup. */
    private String m_provider;

    /** A map with tokens ${...} to be replaced in SQL scripts. */
    private Map m_replacer;

    /** The initial servlet configuration. */
    private ServletConfig m_servletConfig;

    /** The servlet mapping (in web.xml). */
    private String m_servletMapping;

    /** List of sorted keys by ranking of all available database server setups (e.g. "mysql", "generic" or "oracle") */
    private List m_sortedDatabaseKeys;

    /** The workplace import thread. */
    private CmsSetupWorkplaceImportThread m_workplaceImportThread;

    /** Xml read/write helper object. */
    private CmsSetupXmlHelper m_xmlHelper;

    /** 
     * Default constructor.<p>
     */
    public CmsSetupBean() {

        initHtmlParts();
    }

    /**
     * Restores the opencms.xml either to or from a backup file, depending
     * whether the setup wizard is executed the first time (the backup
     * does not exist) or not (the backup exists).
     * 
     * @param filename something like e.g. "opencms.xml"
     * @param originalFilename the configurations real file name, e.g. "opencms.xml.ori"
     */
    public void backupConfiguration(String filename, String originalFilename) {

        // ensure backup folder exists
        File backupFolder = new File(m_configRfsPath + FOLDER_BACKUP);
        if (!backupFolder.exists()) {
            backupFolder.mkdirs();
        }

        // copy file to (or from) backup folder
        originalFilename = FOLDER_BACKUP + originalFilename;
        File file = new File(m_configRfsPath + originalFilename);
        if (file.exists()) {
            copyFile(originalFilename, filename);
        } else {
            copyFile(filename, originalFilename);
        }
    }

    /**
     * Checks the ethernet address value and generates a dummy address, if necessary.<p>     *
     */
    public void checkEthernetAddress() {

        // check the ethernet address in order to generate a random address, if not available                   
        if (CmsStringUtil.isEmpty(getEthernetAddress())) {
            setEthernetAddress(CmsUUID.getDummyEthernetAddress());
        }
    }

    /** 
     * Copies a given file.<p>
     * 
     * @param source the source file
     * @param target the destination file
     */
    public void copyFile(String source, String target) {

        try {
            CmsFileUtil.copy(m_configRfsPath + source, m_configRfsPath + target);
        } catch (IOException e) {
            m_errors.add("Could not copy " + source + " to " + target + " \n");
            m_errors.add(e.toString() + "\n");
        }
    }

    /**
     * Returns html code to display an error.<p> 
     * 
     * @param pathPrefix to adjust the path
     * 
     * @return html code
     */
    public String displayError(String pathPrefix) {

        if (pathPrefix == null) {
            pathPrefix = "";
        }
        StringBuffer html = new StringBuffer(512);
        html.append("<table border='0' cellpadding='5' cellspacing='0' style='width: 100%; height: 100%;'>");
        html.append("\t<tr>");
        html.append("\t\t<td style='vertical-align: middle; height: 100%;'>");
        html.append(getHtmlPart("C_BLOCK_START", "Error"));
        html.append("\t\t\t<table border='0' cellpadding='0' cellspacing='0' style='width: 100%;'>");
        html.append("\t\t\t\t<tr>");
        html.append("\t\t\t\t\t<td><img src='").append(pathPrefix).append("resources/error.png' border='0'></td>");
        html.append("\t\t\t\t\t<td>&nbsp;&nbsp;</td>");
        html.append("\t\t\t\t\t<td style='width: 100%;'>");
        html.append("\t\t\t\t\t\tThe Alkacon OpenCms setup wizard has not been started correctly!<br>");
        html.append("\t\t\t\t\t\tPlease click <a href='").append(pathPrefix);
        html.append("index.jsp'>here</a> to restart the wizard.");
        html.append("\t\t\t\t\t</td>");
        html.append("\t\t\t\t</tr>");
        html.append("\t\t\t</table>");
        html.append(getHtmlPart("C_BLOCK_END"));
        html.append("\t\t</td>");
        html.append("\t</tr>");
        html.append("</table>");
        return html.toString();
    }

    /**
     * Returns a map with all available modules.<p>
     * 
     * The map contains maps keyed by module package names. Each of these maps contains various
     * information about the module such as the module name, version, description, and a list of 
     * it's dependencies. You should refer to the source code of this method to understand the data 
     * structure of the map returned by this method!<p>
     * 
     * @return a map with all available modules
     */
    public Map getAvailableModules() {

        if (m_availableModules == null || m_availableModules.isEmpty()) {
            m_availableModules = new HashMap();
            m_moduleDependencies = new HashMap();
            m_moduleFilenames = new HashMap();

            try {
                Map modules = CmsModuleManager.getAllModulesFromPath(getModuleFolder());
                Iterator itMods = modules.keySet().iterator();
                while (itMods.hasNext()) {
                    CmsModule module = (CmsModule)itMods.next();
                    // put the module information into a map keyed by the module packages names
                    m_availableModules.put(module.getName(), module);
                    m_moduleFilenames.put(module.getName(), modules.get(module));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美在线高清| 91国偷自产一区二区三区观看| 欧美精品自拍偷拍动漫精品| 亚洲综合免费观看高清完整版 | 椎名由奈av一区二区三区| 成人高清在线视频| 曰韩精品一区二区| 在线成人免费视频| 美女精品一区二区| 欧美激情自拍偷拍| 91国产免费观看| 日韩精品一卡二卡三卡四卡无卡| 欧美xxx久久| heyzo一本久久综合| 亚洲综合精品久久| 欧美不卡123| 成人app在线观看| 天堂资源在线中文精品| 日韩欧美不卡一区| 99久久久精品| 奇米精品一区二区三区在线观看一| 精品噜噜噜噜久久久久久久久试看| 国产精品自拍三区| 一区二区成人在线| 精品国产91久久久久久久妲己 | 亚洲国产精品久久人人爱蜜臀| 欧美日韩在线精品一区二区三区激情| 亚洲在线观看免费视频| 久久一区二区视频| 91成人网在线| 国产精品亚洲人在线观看| 亚洲精品成人悠悠色影视| 欧美精品一区二区在线观看| www.欧美色图| 久久99精品久久久| 亚洲福利一二三区| 中文字幕精品在线不卡| 91精品国产高清一区二区三区蜜臀 | 久久理论电影网| 色成人在线视频| 国产电影一区在线| 日精品一区二区| 一色桃子久久精品亚洲| 日韩欧美一区二区免费| 日本丶国产丶欧美色综合| 国产在线一区二区综合免费视频| 亚洲黄色尤物视频| 国产三区在线成人av| 制服丝袜中文字幕一区| 色999日韩国产欧美一区二区| 国产一本一道久久香蕉| 婷婷夜色潮精品综合在线| 亚洲欧洲精品成人久久奇米网| 欧美草草影院在线视频| 欧美日韩的一区二区| 91蝌蚪国产九色| 成人一区二区三区视频在线观看| 美女性感视频久久| 亚洲国产精品综合小说图片区| 亚洲欧美在线另类| 国产精品乱码久久久久久| 久久亚洲精精品中文字幕早川悠里| 7777精品伊人久久久大香线蕉超级流畅| av中文字幕亚洲| 成人18视频日本| 国产精品白丝jk黑袜喷水| 极品少妇xxxx偷拍精品少妇| 美女视频网站黄色亚洲| 视频精品一区二区| 婷婷综合五月天| 亚洲成人av一区二区三区| 亚洲一区二区三区中文字幕在线| 国产精品久久久久久久蜜臀| 国产精品免费视频一区| 中文字幕视频一区二区三区久| 久久久亚洲高清| 国产视频一区二区在线观看| 久久精品网站免费观看| 国产午夜精品一区二区三区视频| 久久无码av三级| 久久蜜桃香蕉精品一区二区三区| 精品福利一二区| 国产亚洲欧美中文| 国产亚洲制服色| 国产精品久久777777| 亚洲日本欧美天堂| 亚洲一区免费在线观看| 日韩不卡一二三区| 日韩在线a电影| 蜜桃久久久久久| 国产乱码精品一区二区三区忘忧草 | 国产精品一二三四区| 高清成人免费视频| 色综合天天综合在线视频| 欧美性受极品xxxx喷水| 欧美人妇做爰xxxⅹ性高电影| 91麻豆精品国产91久久久久| 精品国产一区a| 国产亚洲一区二区三区在线观看| 国产精品麻豆一区二区| 亚洲一区二区在线免费看| 秋霞av亚洲一区二区三| 国产成人精品三级| 色美美综合视频| 日韩视频一区二区三区在线播放| 久久综合九色欧美综合狠狠| 亚洲天堂精品视频| 日本少妇一区二区| 成人午夜私人影院| 欧美午夜精品久久久久久孕妇| 91精品欧美综合在线观看最新| 国产亚洲一区字幕| 亚洲五月六月丁香激情| 国产美女视频91| 欧美亚洲图片小说| 久久久国产精华| 亚洲国产成人av好男人在线观看| 久久97超碰国产精品超碰| 92国产精品观看| 日韩一区二区在线免费观看| 国产精品国模大尺度视频| 日日夜夜精品视频天天综合网| 成人丝袜高跟foot| 91精品视频网| 一区二区三区在线视频观看| 国内成人精品2018免费看| 欧美专区亚洲专区| 国产欧美日韩三级| 石原莉奈一区二区三区在线观看| eeuss鲁片一区二区三区在线看| 欧美久久久久久蜜桃| 国产精品剧情在线亚洲| 九九热在线视频观看这里只有精品| 9人人澡人人爽人人精品| 亚洲精品一线二线三线无人区| 一区二区三区不卡视频在线观看| 国产精品18久久久久| 欧美一区二区三区婷婷月色| 亚洲摸摸操操av| 国产露脸91国语对白| 欧美一区二区啪啪| 亚洲国产美国国产综合一区二区| av在线综合网| 中文字幕免费不卡| 国产自产高清不卡| 欧美一激情一区二区三区| 亚洲一区二区三区不卡国产欧美| 成人动漫av在线| 久久久激情视频| 国产呦萝稀缺另类资源| 91精品国产91久久久久久一区二区 | 久久精品久久综合| 欧美精品久久99| 亚洲电影一级黄| 欧美系列亚洲系列| 亚洲欧美一区二区三区极速播放 | 亚洲欧洲精品天堂一级| 国产成人自拍在线| 欧美sm美女调教| 九色|91porny| 久久一区二区视频| 国内精品免费在线观看| 精品欧美久久久| 国内精品第一页| 久久综合精品国产一区二区三区| 精品影视av免费| 2022国产精品视频| 狠狠色丁香久久婷婷综合_中| 日韩视频国产视频| 久久精品久久精品| 久久一日本道色综合| 国产精品系列在线观看| 国产精品素人一区二区| 成人性视频网站| 17c精品麻豆一区二区免费| 99久久免费精品| 亚洲成av人片在线观看无码| 欧美三级日本三级少妇99| 亚洲第一主播视频| 欧美一区二区在线观看| 另类的小说在线视频另类成人小视频在线 | 蜜臀av亚洲一区中文字幕| 精品动漫一区二区三区在线观看| 久久成人精品无人区| 久久―日本道色综合久久| 国产成人精品1024| 日韩伦理免费电影| 欧美婷婷六月丁香综合色| 欧美aa在线视频| 国产三级精品视频| 日本韩国视频一区二区| 日韩专区中文字幕一区二区| 欧美大黄免费观看| 成人av片在线观看| 亚洲妇熟xx妇色黄| 久久婷婷一区二区三区| 91麻豆高清视频| 免费成人av资源网| 国产精品丝袜在线| 91精品国产综合久久久久|