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

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

?? a_cmsimport.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
            }

            // now try to import the groups in the stack
            while (!m_groupsToCreate.empty()) {
                Stack tempStack = m_groupsToCreate;
                m_groupsToCreate = new Stack();
                while (tempStack.size() > 0) {
                    Map groupdata = (HashMap)tempStack.pop();
                    name = (String)groupdata.get(CmsImportExportManager.N_NAME);
                    description = (String)groupdata.get(CmsImportExportManager.N_DESCRIPTION);
                    flags = (String)groupdata.get(CmsImportExportManager.N_FLAGS);
                    parentgroup = (String)groupdata.get(CmsImportExportManager.N_PARENTGROUP);
                    // try to import the group
                    importGroup(name, description, flags, parentgroup);
                }
            }
        } catch (CmsImportExportException e) {

            throw e;
        } catch (Exception e) {

            m_report.println(e);

            CmsMessageContainer message = Messages.get().container(Messages.ERR_IMPORTEXPORT_ERROR_IMPORTING_GROUPS_0);
            if (LOG.isDebugEnabled()) {
                LOG.debug(message.key(), e);
            }

            throw new CmsImportExportException(message, e);
        }
    }

    /**
     * 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 {

        // create a new user id
        String id = new CmsUUID().toString();
        try {
            try {
                m_report.print(Messages.get().container(Messages.RPT_IMPORT_USER_0), I_CmsReport.FORMAT_NOTE);
                m_report.print(org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_ARGUMENT_1,
                    name));
                m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
                m_cms.importUser(
                    id,
                    name,
                    password,
                    description,
                    firstname,
                    lastname,
                    email,
                    address,
                    Integer.parseInt(flags),
                    Integer.parseInt(type),
                    userInfo);
                // add user to all groups list
                for (int i = 0; i < userGroups.size(); i++) {
                    try {
                        m_cms.addUserToGroup(name, (String)userGroups.get(i));
                    } catch (CmsException exc) {
                        // ignore
                    }
                }
                m_report.println(
                    org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
                    I_CmsReport.FORMAT_OK);
            } catch (CmsException exc) {
                m_report.println(Messages.get().container(Messages.RPT_NOT_CREATED_0), I_CmsReport.FORMAT_OK);
            }
        } catch (Exception e) {

            m_report.println(e);

            CmsMessageContainer message = Messages.get().container(
                Messages.ERR_IMPORTEXPORT_ERROR_IMPORTING_USER_1,
                name);
            if (LOG.isDebugEnabled()) {
                LOG.debug(message.key(), e);
            }
            throw new CmsImportExportException(message, e);
        }
    }

    /**
     * Imports the OpenCms users.<p>
     * 
     * @throws CmsImportExportException if something goes wrong
     */
    protected void importUsers() throws CmsImportExportException {

        List userNodes;
        List groupNodes;
        List userGroups;
        Element currentElement, currentGroup;
        Map userInfo = new HashMap();
        String name, description, flags, password, firstname, lastname, email, address, type, pwd, infoNode, defaultGroup;
        // try to get the import resource
        //getImportResource();
        try {
            // getAll user nodes
            userNodes = m_docXml.selectNodes("//" + CmsImportExportManager.N_USERDATA);
            // walk threw all groups in manifest
            for (int i = 0; i < userNodes.size(); i++) {
                currentElement = (Element)userNodes.get(i);
                name = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_NAME);
                name = OpenCms.getImportExportManager().translateUser(name);
                // decode passwords using base 64 decoder
                pwd = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_PASSWORD);
                password = new String(Base64.decodeBase64(pwd.trim().getBytes()));
                description = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_DESCRIPTION);
                flags = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_FLAGS);
                firstname = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_FIRSTNAME);
                lastname = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_LASTNAME);
                email = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_EMAIL);
                address = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_TAG_ADDRESS);
                type = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_TYPE);
                defaultGroup = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_DEFAULTGROUP);
                // get the userinfo and put it into the additional info map
                infoNode = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_USERINFO);
                try {
                    // read the userinfo from the dat-file
                    byte[] value = getFileBytes(infoNode);
                    // deserialize the object
                    ByteArrayInputStream bin = new ByteArrayInputStream(value);
                    ObjectInputStream oin = new ObjectInputStream(bin);
                    userInfo = (Map)oin.readObject();
                } catch (IOException ioex) {
                    m_report.println(ioex);
                }

                // get the groups of the user and put them into the list
                groupNodes = currentElement.selectNodes("*/" + CmsImportExportManager.N_GROUPNAME);
                userGroups = new ArrayList();
                for (int j = 0; j < groupNodes.size(); j++) {
                    currentGroup = (Element)groupNodes.get(j);
                    String userInGroup = CmsImport.getChildElementTextValue(currentGroup, CmsImportExportManager.N_NAME);
                    userInGroup = OpenCms.getImportExportManager().translateGroup(userInGroup);
                    userGroups.add(userInGroup);
                }

                if (CmsStringUtil.isNotEmpty(defaultGroup)) {
                    userInfo.put(CmsUserSettings.ADDITIONAL_INFO_DEFAULTGROUP, defaultGroup);
                }

                // import this user
                importUser(
                    name,
                    description,
                    flags,
                    password,
                    firstname,
                    lastname,
                    email,
                    address,
                    type,
                    userInfo,
                    userGroups);
            }
        } catch (CmsImportExportException e) {

            throw e;
        } catch (Exception e) {

            m_report.println(e);

            CmsMessageContainer message = Messages.get().container(Messages.ERR_IMPORTEXPORT_ERROR_IMPORTING_USERS_0);
            if (LOG.isDebugEnabled()) {
                LOG.debug(message.key(), e);
            }

            throw new CmsImportExportException(message, e);
        }
    }

    /**
     * Initializes all member variables before the import is started.<p>
     * 
     * This is required since there is only one instance for
     * each import version that is kept in memory and reused.<p>
     */
    protected void initialize() {

        m_groupsToCreate = new Stack();
    }

    /**
     * Reads all properties below a specified parent element from the <code>manifest.xml</code>.<p>
     * 
     * @param parentElement the current file node
     * @param ignoredPropertyKeys a list of properies to be ignored
     * 
     * @return a list with all properties
     */
    protected List readPropertiesFromManifest(Element parentElement, List ignoredPropertyKeys) {

        // all imported Cms property objects are collected in map first forfaster access
        Map properties = new HashMap();
        CmsProperty property = null;
        List propertyElements = parentElement.selectNodes("./"
            + CmsImportExportManager.N_PROPERTIES
            + "/"
            + CmsImportExportManager.N_PROPERTY);
        Element propertyElement = null;
        String key = null, value = null;
        Attribute attrib = null;

        // iterate over all property elements
        for (int i = 0, n = propertyElements.size(); i < n; i++) {
            propertyElement = (Element)propertyElements.get(i);
            key = CmsImport.getChildElementTextValue(propertyElement, CmsImportExportManager.N_NAME);

            if (key == null || ignoredPropertyKeys.contains(key)) {
                // continue if the current property (key) should be ignored or is null
                continue;
            }

            // all Cms properties are collected in a map keyed by their property keys
            property = (CmsProperty)properties.get(key);
            if (property == null) {
                property = new CmsProperty();
                property.setName(key);
                property.setAutoCreatePropertyDefinition(true);
                properties.put(key, property);
            }

            value = CmsImport.getChildElementTextValue(propertyElement, CmsImportExportManager.N_VALUE);
            if (value == null) {
                value = "";
            }

            attrib = propertyElement.attribute(CmsImportExportManager.N_PROPERTY_ATTRIB_TYPE);
            if ((attrib != null) && attrib.getValue().equals(CmsImportExportManager.N_PROPERTY_ATTRIB_TYPE_SHARED)) {
                // it is a shared/resource property value
                property.setResourceValue(value);
            } else {
                // it is an individual/structure value
                property.setStructureValue(value);
            }
        }

        return new ArrayList(properties.values());
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久99免费| 777久久久精品| 国产一区二区三区免费看| 亚洲国产另类av| 一区二区理论电影在线观看| 中文字幕av一区二区三区高| 国产蜜臀av在线一区二区三区| 久久精品亚洲一区二区三区浴池 | 久久久不卡网国产精品二区| 2024国产精品| 国产亚洲欧洲一区高清在线观看| 精品成a人在线观看| 欧美经典三级视频一区二区三区| 国产调教视频一区| 亚洲同性gay激情无套| 亚洲综合小说图片| 亚洲成a人v欧美综合天堂| 奇米一区二区三区av| 麻豆成人免费电影| 成人午夜免费视频| 91在线精品一区二区| 欧美三级电影在线看| 欧美一区二区成人| 日本一区二区动态图| 亚洲一级在线观看| 经典三级一区二区| www.欧美日韩| 欧美精品一级二级| 日本一区二区不卡视频| 亚洲最快最全在线视频| 毛片av中文字幕一区二区| 国产麻豆精品视频| 在线观看成人免费视频| 精品理论电影在线观看 | 一本久道中文字幕精品亚洲嫩| 一本高清dvd不卡在线观看| 日韩欧美高清一区| ㊣最新国产の精品bt伙计久久| 五月天视频一区| 国产黄色成人av| 欧美日韩一级片网站| 国产欧美一区二区三区在线看蜜臀| 亚洲人精品午夜| 久久不见久久见免费视频1| 色视频欧美一区二区三区| 久久综合给合久久狠狠狠97色69| 亚洲另类色综合网站| 国产一区中文字幕| 欧美日韩一区三区| 中文字幕一区在线观看视频| 青娱乐精品视频在线| 一本在线高清不卡dvd| 国产欧美精品一区| 久久99在线观看| 欧美午夜理伦三级在线观看| 国产精品美女久久久久久| 激情都市一区二区| 欧美区视频在线观看| 亚洲欧美日本韩国| 成人午夜看片网址| 久久久久久亚洲综合影院红桃| 视频一区欧美日韩| 欧美专区亚洲专区| 亚洲精品乱码久久久久久久久| 国产一区二区导航在线播放| 91精品国产欧美一区二区| 亚洲1区2区3区4区| 欧美日韩国产小视频| 亚洲一区二区三区不卡国产欧美 | 无码av中文一区二区三区桃花岛| 成人免费福利片| 日本一区二区三区久久久久久久久不 | 欧美激情一区二区三区四区| 韩国午夜理伦三级不卡影院| 欧美成人a视频| 日产欧产美韩系列久久99| 欧美专区日韩专区| 亚洲v精品v日韩v欧美v专区| 欧美影院精品一区| 亚洲第一福利一区| 日韩一区二区三区精品视频| 日韩经典一区二区| 日韩美一区二区三区| 久久电影网电视剧免费观看| 久久新电视剧免费观看| 国产成人av自拍| 亚洲国产成人一区二区三区| 99热精品一区二区| 一区二区三区成人在线视频| 欧美视频精品在线观看| 日韩和欧美一区二区| 2021国产精品久久精品| 国产成人免费高清| 亚洲三级在线播放| 欧美日韩一区二区三区在线看| 日日噜噜夜夜狠狠视频欧美人| 日韩一级精品视频在线观看| 国产一区二区三区免费观看| 亚洲视频一二三区| 欧美日本一区二区三区四区| 久久电影国产免费久久电影| 国产精品天干天干在线综合| 欧美少妇性性性| 紧缚奴在线一区二区三区| 国产精品每日更新| 欧美日韩一级大片网址| 国产一区二区女| 亚洲免费资源在线播放| 日韩美女在线视频| 色综合色狠狠天天综合色| 欧美a一区二区| 中文字幕高清不卡| 欧美日韩卡一卡二| 国产精品综合视频| 亚洲动漫第一页| 国产午夜三级一区二区三| 在线观看亚洲精品| 国产精华液一区二区三区| 亚洲国产毛片aaaaa无费看 | 欧美色手机在线观看| 国产一区在线不卡| 香蕉av福利精品导航| 中文字幕乱码一区二区免费| 欧美精品99久久久**| av激情成人网| 久久99日本精品| 亚洲综合在线五月| 国产三级欧美三级| 51午夜精品国产| 91官网在线观看| 成人av网在线| 国产高清不卡一区| 久久国产福利国产秒拍| 亚洲成人777| 一区二区三区免费| 国产精品久久久久久久久免费桃花| 日韩欧美资源站| 欧美日韩午夜精品| 99精品视频一区二区| 成人精品高清在线| 国产69精品久久久久毛片| 国内精品自线一区二区三区视频| 石原莉奈一区二区三区在线观看| 亚洲免费在线视频| 亚洲欧美另类综合偷拍| 国产精品电影一区二区三区| 精品国产1区2区3区| 日韩美女天天操| 日韩欧美国产一二三区| 日韩一区二区视频| 欧美一区二区视频网站| 日韩一级片在线播放| 日韩视频在线永久播放| 538在线一区二区精品国产| 91精品啪在线观看国产60岁| 欧美日韩成人综合在线一区二区 | 久久精品一区蜜桃臀影院| 欧美精品一区二区三区久久久| 日韩免费视频一区二区| 亚洲精品在线观看网站| 久久久一区二区| 国产精品久久综合| 亚洲欧美日韩系列| 亚洲一线二线三线久久久| 亚洲综合av网| 日韩国产一二三区| 久久99精品国产91久久来源| 国内精品自线一区二区三区视频| 国产精品996| 95精品视频在线| 精品视频一区二区不卡| 欧美一区二区三区四区五区 | 色播五月激情综合网| 欧美日韩aaaaa| 2024国产精品| 亚洲免费av在线| 石原莉奈在线亚洲二区| 国产揄拍国内精品对白| 99久久精品免费看| 欧美精品日韩综合在线| 久久婷婷国产综合国色天香| 亚洲欧洲av一区二区三区久久| 亚洲一区二三区| 国内精品写真在线观看| 色婷婷av一区| 精品国产sm最大网站免费看| 亚洲视频一二三| 精品一区二区日韩| 色猫猫国产区一区二在线视频| 欧美二区三区91| 中文字幕不卡一区| 日本成人中文字幕| 99久久伊人网影院| 日韩精品中文字幕在线一区| 亚洲日本电影在线| 国产在线不卡视频| 777久久久精品| 亚洲欧美电影院| 国产精品一区二区在线观看网站| 欧美日韩小视频|