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

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

?? testchangeproperties.java

?? cms是開源的框架
?? JAVA
字號(hào):
/*
 * File   : $Source: /usr/local/cvs/opencms/test/org/opencms/file/TestChangeProperties.java,v $
 * Date   : $Date: 2005/06/25 12:02:09 $
 * Version: $Revision: 1.1 $
 *
 * 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.file;

import org.opencms.test.OpenCmsTestCase;
import org.opencms.test.OpenCmsTestProperties;

import java.util.List;

import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;

/**
 * Unit tests for the <code>{@link CmsObject#changeResourcesInFolderWithProperty(String, String, String, String, boolean)}</code>
 * method.<p>
 * 
 * @author Matthias Gafert
 * 
 * @version $Revision: 1.1 $
 */
public class TestChangeProperties extends OpenCmsTestCase {

    /**
     * Default JUnit constructor.<p>
     * 
     * @param arg0 JUnit parameters
     */
    public TestChangeProperties(String arg0) {

        super(arg0);
    }

    /**
     * Test suite for this test class.<p>
     * 
     * @return the test suite
     */
    public static Test suite() {

        OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);

        TestSuite suite = new TestSuite();
        suite.setName(TestChangeProperties.class.getName());

        suite.addTest(new TestChangeProperties("testChangeResourcesRelativePath"));
        suite.addTest(new TestChangeProperties("testChangeResourcesFullPath"));

        TestSetup wrapper = new TestSetup(suite) {

            protected void setUp() {

                setupOpenCms("simpletest", "/sites/default/");
            }

            protected void tearDown() {

                removeOpenCms();
            }
        };

        return wrapper;
    }

    /**
     * Tries to change the "Description" property of the two files
     * "/folder1/index.html" and "/folder2/index.html" with the site-root
     * "/sites/default".
     * 
     * The test fails, if the <code>recursive</code> parameter of
     * <code>changeResourcesInFolderWithProperty()</code> changes the
     * semantics of the method call.<p> 
     * 
     * @throws Throwable if an error occurs while the test is running
     */
    public void testChangeResourcesRelativePath() throws Throwable {

        CmsObject cms = getCmsObject();

        // Init
        String resource1 = "/folder1/subfolder11/index.html";
        String resource2 = "/folder1/subfolder12/index.html";
        cms.lockResource(resource1);
        cms.lockResource(resource2);
        assertLock(cms, resource1);
        assertLock(cms, resource2);

        // Recursive semantics
        System.out.println("Changing property of \""
            + resource1
            + "\" in \""
            + cms.getRequestContext().getSiteRoot()
            + "\"");

        List l1 = cms.changeResourcesInFolderWithProperty(
            resource1,
            CmsPropertyDefinition.PROPERTY_DESCRIPTION,
            "This is the index page of subfolder11",
            "Changed Value",
            true);

        // Non-recursive semantics
        System.out.println("Changing property of \""
            + resource2
            + "\" in \""
            + cms.getRequestContext().getSiteRoot()
            + "\"");

        List l2 = cms.changeResourcesInFolderWithProperty(
            resource2,
            CmsPropertyDefinition.PROPERTY_DESCRIPTION,
            "This is the index in subfolder12",
            "Changed value",
            false);

        // One resource should have been changed with each call
        assertEquals(l1.size(), l2.size());
    }

    /**
     * Tries to change the "Description" property of the two files
     * "/sites/default/folder1/index.html" and
     * "/sites/default/folder2/index.html" with the site-root "".
     * 
     * The test fails, if the <code>recursive</code> parameter of
     * <code>changeResourcesInFolderWithProperty()</code> changes the
     * semantics of the method call.<p> 
     * 
     * @throws Throwable if an error occurs while the test is running
     */
    public void testChangeResourcesFullPath() throws Throwable {

        CmsObject cms = getCmsObject();

        // Init
        String resource1 = cms.getRequestContext().getSiteRoot() + "/folder2/subfolder21/index.html";
        String resource2 = cms.getRequestContext().getSiteRoot() + "/folder2/subfolder22/index.html";

        cms.getRequestContext().setSiteRoot("");

        cms.lockResource(resource1);
        cms.lockResource(resource2);
        assertLock(cms, resource1);
        assertLock(cms, resource2);

        // Recursive semantics
        System.out.println("Changing property of \""
            + resource1
            + "\" in \""
            + cms.getRequestContext().getSiteRoot()
            + "\"");

        List l1 = cms.changeResourcesInFolderWithProperty(
            resource1,
            CmsPropertyDefinition.PROPERTY_DESCRIPTION,
            "This is the index page in subfolder21",
            "Changed Value",
            true);

        // Non-recursive semantics
        System.out.println("Changing property of \""
            + resource2
            + "\" in \""
            + cms.getRequestContext().getSiteRoot()
            + "\"");

        List l2 = cms.changeResourcesInFolderWithProperty(
            resource2,
            CmsPropertyDefinition.PROPERTY_DESCRIPTION,
            "This is the index page in subfolder22",
            "Changed value",
            false);

        // One resource should have been changed with each call
        assertEquals(l1.size(), l2.size());
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合分类小说区另类春色亚洲小说欧美 | 国产成人免费xxxxxxxx| 日本久久电影网| 一区二区免费视频| 欧美日韩黄色影视| 另类小说欧美激情| 国产欧美一区二区三区在线看蜜臀 | 国产精品亚洲人在线观看| 国产日产欧美一区| 不卡av免费在线观看| 亚洲一区二区三区中文字幕在线| 欧美日韩一区二区三区视频| 美腿丝袜一区二区三区| 中文字幕欧美区| 在线视频一区二区三| 久久黄色级2电影| 欧美国产视频在线| 欧美视频完全免费看| 久久国产精品99久久久久久老狼| 国产日本欧美一区二区| 欧美主播一区二区三区| 韩国欧美国产1区| 亚洲摸摸操操av| 日韩欧美久久一区| 97精品久久久午夜一区二区三区 | 奇米色777欧美一区二区| 国产亚洲精品福利| 在线视频国内自拍亚洲视频| 国内久久婷婷综合| 亚洲综合激情网| 久久精品一区二区三区四区 | 欧美日韩亚洲高清一区二区| 久久99精品一区二区三区三区| 中文字幕一区二区日韩精品绯色| 欧美一区二区二区| 色综合天天做天天爱| 久久精品99久久久| 一区二区三区四区不卡视频| 久久免费视频色| 欧美猛男男办公室激情| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 91精品久久久久久蜜臀| 99精品久久免费看蜜臀剧情介绍| 毛片av一区二区| 亚洲一区视频在线| 欧美激情在线看| 精品日韩av一区二区| 欧美天堂一区二区三区| 99久久综合99久久综合网站| 九九视频精品免费| 日韩国产成人精品| 亚洲精品综合在线| 亚洲国产电影在线观看| 26uuu另类欧美亚洲曰本| 欧美日本在线一区| 一本色道综合亚洲| 91丝袜美女网| fc2成人免费人成在线观看播放| 精品无码三级在线观看视频| 日韩av一区二区三区| 一区二区三区欧美亚洲| 中文字幕一区二区三区在线播放| 国产亚洲一区二区三区四区 | 国产亚洲成aⅴ人片在线观看| 欧美一区二区人人喊爽| 欧美男人的天堂一二区| 欧美吻胸吃奶大尺度电影| 91在线免费播放| 99九九99九九九视频精品| 国产超碰在线一区| 国产成人在线观看| 国产老肥熟一区二区三区| 韩国成人在线视频| 国产精品一区2区| 国产精品自产自拍| 国产精品亚洲第一区在线暖暖韩国| 精品在线观看视频| 精品一区二区三区久久| 久久99国产精品免费网站| 毛片基地黄久久久久久天堂| 精品制服美女久久| 国产综合一区二区| 成人午夜碰碰视频| 成人h精品动漫一区二区三区| 成人在线综合网站| 99久久综合国产精品| 91九色02白丝porn| 欧美另类高清zo欧美| 欧美一级在线观看| 久久久亚洲午夜电影| 国产精品国产三级国产专播品爱网| 中文字幕日韩精品一区| 亚洲精品成人a在线观看| 亚洲一区二区av在线| 日本欧美在线看| 国产成人综合自拍| 色综合久久综合| 欧美精品1区2区3区| 欧美成va人片在线观看| 久久精品视频一区| 樱花影视一区二区| 日本亚洲最大的色成网站www| 精品一区二区免费在线观看| 成人一区二区三区| 欧美日韩一二区| 精品国产第一区二区三区观看体验| 国产午夜精品一区二区三区嫩草| 国产精品国产三级国产| 亚洲午夜免费视频| 国产剧情在线观看一区二区| 92精品国产成人观看免费 | 久久亚洲精品小早川怜子| 国产精品不卡在线| 日本不卡一区二区| 91在线观看视频| 欧美一级在线观看| 亚洲免费视频中文字幕| 美女网站在线免费欧美精品| av中文字幕在线不卡| 91精品国产免费| 亚洲色欲色欲www| 激情综合一区二区三区| 色综合中文字幕| 久久影院午夜片一区| 亚洲一二三四在线| 床上的激情91.| 欧美一区二区三区在线观看| 中文字幕亚洲电影| 青椒成人免费视频| 在线观看亚洲精品| 国产日本欧洲亚洲| 精品一区在线看| 欧美久久久影院| 亚洲特黄一级片| 国产主播一区二区| 91精品欧美一区二区三区综合在 | 久久精品国产一区二区三 | 中文字幕一区二区三区蜜月| 另类小说色综合网站| 欧美久久久影院| 亚洲精品第一国产综合野| 处破女av一区二区| 欧美v亚洲v综合ⅴ国产v| 亚洲国产日韩综合久久精品| 成人禁用看黄a在线| 2020国产精品自拍| 久久精品理论片| 日韩一区二区三区av| 亚洲国产精品久久久男人的天堂| 成人一二三区视频| 国产日产精品一区| 国产精品一区二区久久精品爱涩 | 宅男在线国产精品| 天天综合日日夜夜精品| 欧美午夜精品一区二区三区| 亚洲视频每日更新| 91香蕉国产在线观看软件| 2021国产精品久久精品| 韩日av一区二区| 久久精品夜色噜噜亚洲aⅴ| 九九精品一区二区| 精品国产乱码久久久久久闺蜜| 奇米一区二区三区av| 日韩精品专区在线| 免费成人你懂的| 精品国产乱码久久久久久牛牛 | 国产91清纯白嫩初高中在线观看 | 91精品国产综合久久久久久久 | 亚洲久草在线视频| 91浏览器打开| 亚洲午夜精品在线| 欧美女孩性生活视频| 免费在线观看一区| 精品av久久707| 国产毛片精品一区| 亚洲精品在线观看网站| 国产精品一区二区久久精品爱涩| 久久久国产精品不卡| 丁香五精品蜜臀久久久久99网站| 亚洲国产精华液网站w| gogo大胆日本视频一区| 亚洲一区二区视频| 91精品在线一区二区| 久久精品国产成人一区二区三区| 久久女同精品一区二区| www.99精品| 午夜av一区二区三区| 日韩欧美亚洲国产精品字幕久久久 | 中文字幕第一区综合| 91在线porny国产在线看| 亚洲最大色网站| 欧美一区二区在线免费播放| 国产一区二区福利| 亚洲美女少妇撒尿| 欧美一级片在线| 不卡一区在线观看| 亚洲最大色网站| 久久久91精品国产一区二区精品 | 成人app在线| 亚洲国产日韩综合久久精品|