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

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

?? cmsimportversion3.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
                    datecreated = Long.parseLong(timestamp);
                } else {
                    datecreated = System.currentTimeMillis();
                }
                // <usercreated>
                usercreated = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_USERCREATED);
                // <flags>              
                flags = CmsImport.getChildElementTextValue(currentElement, CmsImportExportManager.N_FLAGS);

                String translatedName = m_cms.getRequestContext().addSiteRoot(m_importPath + destination);
                if (CmsResourceTypeFolder.RESOURCE_TYPE_NAME.equals(type)) {
                    translatedName += "/";
                }
                // translate the name during import
                translatedName = m_cms.getRequestContext().getDirectoryTranslator().translateResource(translatedName);
                // check if this resource is immutable
                boolean resourceNotImmutable = checkImmutable(translatedName, immutableResources);
                translatedName = m_cms.getRequestContext().removeSiteRoot(translatedName);
                // if the resource is not immutable and not on the exclude list, import it
                if (resourceNotImmutable) {
                    // print out the information to the report
                    m_report.print(Messages.get().container(Messages.RPT_IMPORTING_0), I_CmsReport.FORMAT_NOTE);
                    m_report.print(org.opencms.report.Messages.get().container(
                        org.opencms.report.Messages.RPT_ARGUMENT_1,
                        translatedName));
                    //m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0));
                    // get all properties
                    properties = readPropertiesFromManifest(currentElement, deleteProperties);

                    // import the resource               
                    CmsResource res = importResource(
                        source,
                        destination,
                        type,
                        uuidresource,
                        datelastmodified,
                        userlastmodified,
                        datecreated,
                        usercreated,
                        flags,
                        properties);

                    List aceList = new ArrayList();
                    if (res != null) {

                        // write all imported access control entries for this file
                        acentryNodes = currentElement.selectNodes("*/" + CmsImportExportManager.N_ACCESSCONTROL_ENTRY);
                        // collect all access control entries
                        for (int j = 0; j < acentryNodes.size(); j++) {
                            currentEntry = (Element)acentryNodes.get(j);
                            // get the data of the access control entry
                            String id = CmsImport.getChildElementTextValue(
                                currentEntry,
                                CmsImportExportManager.N_ACCESSCONTROL_PRINCIPAL);
                            String acflags = CmsImport.getChildElementTextValue(
                                currentEntry,
                                CmsImportExportManager.N_FLAGS);
                            String allowed = CmsImport.getChildElementTextValue(
                                currentEntry,
                                CmsImportExportManager.N_ACCESSCONTROL_PERMISSIONSET
                                    + "/"
                                    + CmsImportExportManager.N_ACCESSCONTROL_ALLOWEDPERMISSIONS);
                            String denied = CmsImport.getChildElementTextValue(
                                currentEntry,
                                CmsImportExportManager.N_ACCESSCONTROL_PERMISSIONSET
                                    + "/"
                                    + CmsImportExportManager.N_ACCESSCONTROL_DENIEDPERMISSIONS);

                            // get the correct principal
                            try {
                                String principalId = new CmsUUID().toString();
                                String principal = id.substring(id.indexOf('.') + 1, id.length());

                                if (id.startsWith(I_CmsPrincipal.PRINCIPAL_GROUP)) {
                                    principal = OpenCms.getImportExportManager().translateGroup(principal);
                                    principalId = m_cms.readGroup(principal).getId().toString();
                                } else {
                                    principal = OpenCms.getImportExportManager().translateUser(principal);
                                    principalId = m_cms.readUser(principal).getId().toString();
                                }

                                // add the entry to the list
                                aceList.add(getImportAccessControlEntry(res, principalId, allowed, denied, acflags));
                            } catch (CmsDataAccessException e) {
                                // user or group not found, so do not import the ace                                
                            }
                        }
                        importAccessControlEntries(res, aceList);

                    } else {
                        // resource import failed, since no CmsResource was created
                        m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE);
                        m_report.println(org.opencms.report.Messages.get().container(
                            org.opencms.report.Messages.RPT_ARGUMENT_1,
                            translatedName));
                    }
                } else {
                    // skip the file import, just print out the information to the report
                    m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE);
                    m_report.println(org.opencms.report.Messages.get().container(
                        org.opencms.report.Messages.RPT_ARGUMENT_1,
                        translatedName));
                }
            }

        } catch (Exception e) {

            m_report.println(e);

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

            throw new CmsImportExportException(message, e);
        } finally {
            if (m_importingChannelData) {
                m_cms.getRequestContext().restoreSiteRoot();
            }
        }

    }

    /**
     * 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 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 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,
        String type,
        String uuidresource,
        long datelastmodified,
        String userlastmodified,
        long datecreated,
        String usercreated,
        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 all required information to create a CmsResource
            I_CmsResourceType resType;

            // 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();
            }

            // convert to xml page if wanted
            if (m_convertToXmlPage && (type.equals(RESOURCE_TYPE_NEWPAGE_NAME))) {

                if (content != null) {

                    //get the encoding
                    String encoding = null;
                    encoding = CmsProperty.get(CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, properties).getValue();
                    if (encoding == null) {
                        encoding = OpenCms.getSystemInfo().getDefaultEncoding();
                    }

                    CmsXmlPage xmlPage = CmsXmlPageConverter.convertToXmlPage(m_cms, content, getLocale(
                        destination,
                        properties), encoding);

                    content = xmlPage.marshal();
                }
                resType = OpenCms.getResourceManager().getResourceType(CmsResourceTypeXmlPage.getStaticTypeId());
            } else if (type.equals(RESOURCE_TYPE_LINK_NAME)) {
                resType = OpenCms.getResourceManager().getResourceType(CmsResourceTypePointer.getStaticTypeId());
            } else if (type.equals(RESOURCE_TYPE_LEGACY_PAGE_NAME)) {
                resType = OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeId());
            } else {
                resType = OpenCms.getResourceManager().getResourceType(type);
            }

            // get UUIDs for the resource and content        
            CmsUUID newUuidresource = null;
            if ((uuidresource != null) && (!resType.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,
                resType.getTypeId(),
                resType.isFolder(),
                new Integer(flags).intValue(),
                m_cms.getRequestContext().currentProject().getId(),
                CmsResource.STATE_NEW,
                datecreated,
                newUsercreated,
                datelastmodified,
                newUserlastmodified,
                CmsResource.DATE_RELEASED_DEFAULT,
                CmsResource.DATE_EXPIRED_DEFAULT,
                1,
                size);

            if (type.equals(RESOURCE_TYPE_LINK_NAME)) {
                // store links for later conversion
                m_report.print(Messages.get().container(Messages.RPT_STORING_LINK_0), I_CmsReport.FORMAT_NOTE);
                m_linkStorage.put(m_importPath + destination, new String(content));
                m_linkPropertyStorage.put(m_importPath + destination, properties);
                result = resource;
            } else {
                // import this resource in the VFS
                result = m_cms.importResource(destination, resource, content, properties);
            }

            if (result != null) {
                m_report.println(
                    org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
                    I_CmsReport.FORMAT_OK);
            }
        } catch (Exception exc) {
            // an error while importing the file
            m_report.println(exc);
            try {
                // Sleep some time after an error so that the report output has a chance to keep up
                Thread.sleep(1000);
            } catch (Exception e) {
                // 
            }
        }

        return result;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩**一区毛片| 久久蜜臀精品av| 亚洲一区二区精品久久av| 91麻豆国产香蕉久久精品| 亚洲欧美一区二区在线观看| 在线观看三级视频欧美| 亚洲午夜久久久久久久久电影院| 欧美午夜片在线观看| 日韩二区三区在线观看| 久久久久久久综合狠狠综合| 99视频国产精品| 亚洲午夜国产一区99re久久| 67194成人在线观看| 韩国av一区二区三区在线观看| 国产日韩欧美不卡在线| 91首页免费视频| 日韩电影免费在线| 国产欧美精品一区aⅴ影院| 色先锋资源久久综合| 日本免费新一区视频| 国产女同性恋一区二区| 欧美午夜在线一二页| 国内精品写真在线观看| 综合久久久久久| 日韩一本二本av| 91丨九色丨蝌蚪丨老版| 蜜臀av在线播放一区二区三区| 国产欧美日韩精品a在线观看| 色哟哟国产精品| 国产精品中文字幕日韩精品| 亚洲综合一区二区精品导航| 精品国产伦一区二区三区观看方式 | 极品尤物av久久免费看| 国产精品久久久久影院老司| 欧美人与z0zoxxxx视频| 国产v日产∨综合v精品视频| 亚洲黄色小说网站| 精品国产乱码久久久久久蜜臀| 91麻豆成人久久精品二区三区| 日韩电影一区二区三区四区| 成人免费一区二区三区视频 | 欧洲精品在线观看| 国产东北露脸精品视频| 三级亚洲高清视频| 亚洲免费在线视频一区 二区| 日韩欧美色综合网站| 在线观看视频一区| 成人不卡免费av| 黄一区二区三区| 秋霞午夜鲁丝一区二区老狼| 亚洲精品videosex极品| 中文成人综合网| 精品国精品国产| 欧美一区二区三区白人| 欧美三级日韩在线| 色婷婷精品久久二区二区蜜臂av| 丁香桃色午夜亚洲一区二区三区| 蜜桃精品视频在线| 婷婷中文字幕一区三区| 午夜不卡av免费| 国产成都精品91一区二区三| 久久se精品一区二区| 精品福利av导航| 欧美福利视频一区| 欧美三区在线观看| 色婷婷精品大在线视频 | 一区二区三区欧美激情| 国产欧美一区二区精品性色 | 国产精品私人自拍| 国产日韩欧美一区二区三区综合| 久久综合精品国产一区二区三区 | 久久你懂得1024| 欧美大度的电影原声| 欧美一区二区视频网站| 欧美日韩aaaaaa| 欧美猛男男办公室激情| 欧美性xxxxx极品少妇| 欧美日韩午夜在线| 欧美精品一卡两卡| 国产精品一二二区| 亚洲成av人片一区二区梦乃| 福利电影一区二区三区| 7777精品伊人久久久大香线蕉超级流畅 | 在线影院国内精品| 日本高清不卡一区| 欧美色国产精品| 在线不卡a资源高清| 91精品国产乱| 欧美成人vr18sexvr| 26uuu成人网一区二区三区| 久久先锋影音av鲁色资源| 久久众筹精品私拍模特| 国产蜜臀av在线一区二区三区| 欧美国产欧美综合| 亚洲激情男女视频| 图片区小说区区亚洲影院| 麻豆国产精品视频| 欧美白人最猛性xxxxx69交| 国产亚洲精品aa| 欧美区视频在线观看| 91精品国产丝袜白色高跟鞋| 日韩午夜激情视频| 欧美国产日本韩| 亚洲小说欧美激情另类| 麻豆成人免费电影| av电影天堂一区二区在线| 99re视频精品| 欧美一级精品在线| 国产午夜精品一区二区三区视频 | 欧美高清激情brazzers| 日韩欧美一区二区免费| 国产精品久久福利| 亚洲国产精品久久久久婷婷884| 久久国产精品72免费观看| 国产99久久久久久免费看农村| 日本高清不卡aⅴ免费网站| 欧美大肚乱孕交hd孕妇| 日韩理论在线观看| 麻豆国产精品官网| 一本久久精品一区二区| 日韩精品一区二| 亚洲激情五月婷婷| 日韩成人一级片| 国产.欧美.日韩| 一区二区三区在线播放| 久久成人免费电影| 99re成人精品视频| www日韩大片| 亚洲123区在线观看| av亚洲产国偷v产偷v自拍| 宅男在线国产精品| 最新高清无码专区| 国内精品国产三级国产a久久| 91福利小视频| 国产女人水真多18毛片18精品视频| 丝袜亚洲另类欧美| 91精品福利视频| 国产精品久久久久久久久免费樱桃 | 亚洲一区在线视频观看| 国产成人在线色| 欧美mv日韩mv亚洲| 日本视频中文字幕一区二区三区| 国产精品久久久久aaaa| 激情小说亚洲一区| 欧美日韩在线播放一区| av在线不卡网| 欧美视频在线一区二区三区| 中文字幕不卡一区| 国产精品亚洲一区二区三区在线 | 成人av免费在线播放| 欧美v日韩v国产v| 日日夜夜一区二区| 欧美美女一区二区在线观看| 亚洲同性gay激情无套| 国产1区2区3区精品美女| 久久午夜羞羞影院免费观看| 美女尤物国产一区| 欧美一级一区二区| 亚洲chinese男男1069| 91豆麻精品91久久久久久| 中文字幕一区二区视频| 成人黄色在线网站| 国产蜜臀av在线一区二区三区| 国产在线精品一区二区不卡了| 7799精品视频| 日韩av电影天堂| 欧美美女视频在线观看| 久久美女高清视频| av在线一区二区| 精品国产网站在线观看| av电影天堂一区二区在线| 久久综合999| 国产酒店精品激情| 久久久久九九视频| 九九在线精品视频| 久久女同精品一区二区| 丁香另类激情小说| 欧美经典三级视频一区二区三区| 成人一区二区三区| 亚洲美女屁股眼交3| 欧洲人成人精品| 天天影视涩香欲综合网| 91精品国产欧美日韩| 久久99精品久久久久| 久久久久国色av免费看影院| 丁香婷婷综合激情五月色| 日韩一区在线免费观看| 欧美婷婷六月丁香综合色| 免费观看在线色综合| 精品国产伦一区二区三区观看方式| 国产一区二区三区免费观看| 国产精品亲子乱子伦xxxx裸| 色婷婷国产精品| 日韩高清中文字幕一区| 国产色婷婷亚洲99精品小说| 色欧美片视频在线观看| 蜜臀久久99精品久久久画质超高清| 国产婷婷色一区二区三区四区| 欧美电影免费观看完整版| 久久综合资源网|