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

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

?? testpublishing.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
       // publish a deleted resource with siblings, 
       // delete the siblings also, but publish only the resource itself
       
       // delete the resources 
       cms.lockResource(resource2);
       cms.deleteResource(resource2, CmsResource.DELETE_REMOVE_SIBLINGS);
       cms.unlockResource(resource2);
       
       // this test makes only sense when siblings are published
       cms.publishResource(resource2, false, new CmsShellReport(cms.getRequestContext().getLocale()));

       // the online file must be deleted
       cms.getRequestContext().setCurrentProject(onlineProject);
       try {
           cms.readResource(resource2);
           fail ("Resource " + resource2 + " was not deleted online");
       } catch (CmsVfsResourceNotFoundException e) {
           // ok
      } catch (CmsException e) {
           fail("Resource " + resource2 + " error:" +e);
       }    
       // the other siblings must still be there
      try {
          cms.readResource(resource3);
      } catch (CmsException e) {
              fail("Resource " + resource3 + " error:" +e);
      }
      try {
          cms.readResource(resource4);
      } catch (CmsException e) {
            fail("Resource " + resource4 + " error:" +e);
      }
      
      cms.getRequestContext().setCurrentProject(offlineProject);
      // in the offline project, the siblings must be still marked as deleted
      assertState(cms, resource3, CmsResource.STATE_DELETED);
      assertState(cms, resource4, CmsResource.STATE_DELETED);
      
      // publish a deleted resource with siblings, delete the siblings
      //
      cms.publishResource(resource3, true, new CmsShellReport(cms.getRequestContext().getLocale()));
      
      // the online files must be deleted
      cms.getRequestContext().setCurrentProject(onlineProject);
      try {
          cms.readResource(resource3);
          fail ("Resource " + resource3 + " was not deleted online");
      } catch (CmsVfsResourceNotFoundException e) {
          // ok
      } catch (CmsException e) {
          fail("Resource " + resource3 + " error:" +e);
      } 
      try {
          cms.readResource(resource4);
          fail ("Resource " + resource4 + " was not deleted online");
      } catch (CmsVfsResourceNotFoundException e) {
          // ok
      } catch (CmsException e) {
          fail("Resource " + resource4 + " error:" +e);
      } 
      
      cms.getRequestContext().setCurrentProject(offlineProject);

    }

    /**
     * Test publishing changed files.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    public void testPublishLockedFiles() throws Throwable {
        
        CmsObject cms = getCmsObject();     
        echo("Testing publish locked files");
        
        String source = "/folder2/subfolder21/image1.gif";
        String resource1 = "/folder2/image1_new.gif";
        String resource2 = "/folder2/image1_sibling1.gif";
        
        CmsProject onlineProject  = cms.readProject("Online");
        
        CmsProperty prop0;
        CmsProperty prop1;
        CmsProperty prop2;
  
        // make changes to the resources 
        // do not need to make any changes to resource3 and resource4 as they are
        // siblings of resource2!
 
        cms.lockResource(source);
        cms.lockResource(resource1);
        cms.lockResource(resource2);
        
        cms.writePropertyObject(source, new CmsProperty("Title", source + " modified", null));
        cms.writePropertyObject(resource1, new CmsProperty("Title", resource1 + " modified", null));
        cms.writePropertyObject(resource2, new CmsProperty("Title", resource2 + " modified", null));

        storeResources(cms, source);
        storeResources(cms, resource1);
        storeResources(cms, resource2);
       
        // publish a modified resource without siblings
        cms.publishProject();

        // ensure that all changed resources are still changed in the offline project
        assertState(cms, source, CmsResource.STATE_CHANGED);
        assertState(cms, resource1, CmsResource.STATE_CHANGED);
        assertState(cms, resource2, CmsResource.STATE_CHANGED);
                
        // ensure that all changed resources are NOT published
        cms.getRequestContext().setCurrentProject(onlineProject);
        prop0 = cms.readPropertyObject(source, "Title", false);
        prop1 = cms.readPropertyObject(resource1, "Title", false);
        prop2 = cms.readPropertyObject(resource2, "Title", false);
        
        if (prop0.getValue().equals((source + " modified"))) {
            fail("Property published for " + source);
        }
        if (prop1.getValue().equals((resource1 + " modified"))) {
            fail("Property published for " + resource1);
        }        
        if (prop2.getValue().equals((resource2 + " modified"))) {
            fail("Property published for " + resource2);
        }
    }  
    
    
    
    
    /**
     * Test publishing new files.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    public void testPublishNewFiles() throws Throwable {
        
        CmsObject cms = getCmsObject();     
        echo("Testing publish new files");
        
        String source = "/folder2/subfolder21/image1.gif";
        String destination1 = "/folder2/image1_new.gif";
        String destination2 = "/folder2/image1_sibling1.gif";
        String destination3 = "/folder2/image1_sibling2.gif";
        String destination4 = "/folder2/image1_sibling3.gif";
        
        CmsProject onlineProject  = cms.readProject("Online");
        CmsProject offlineProject  = cms.readProject("Offline");

        // make four copies of a file to be published later
        cms.copyResource(source, destination1, CmsResource.COPY_AS_NEW);
        cms.copyResource(source, destination2, CmsResource.COPY_AS_SIBLING);
        cms.copyResource(source, destination3, CmsResource.COPY_AS_SIBLING);
        cms.copyResource(source, destination4, CmsResource.COPY_AS_SIBLING);
        
        storeResources(cms, destination1);
        storeResources(cms, destination2);
        storeResources(cms, destination3);
        storeResources(cms, destination4);
        
        // unlock all new resources
        // do not neet do unlock destination3 as it is a sibling of destination2     
        cms.unlockResource(destination1);
        cms.unlockResource(destination2);    
        
        // publish a new resource
        //
        cms.publishResource(destination1);

        // the file must be now available in the online project
        cms.getRequestContext().setCurrentProject(onlineProject);
        try {
            cms.readResource(destination1);
        } catch (CmsException e) {
            fail("Resource " + destination1 + " not found in online project:" +e);
        }    
        assertFilter(cms, destination1, OpenCmsTestResourceFilter.FILTER_PUBLISHRESOURCE);  
        
        // check if the file in the offline project is unchancged now
        cms.getRequestContext().setCurrentProject(offlineProject);
        assertState(cms, destination1, CmsResource.STATE_UNCHANGED);     
 
        // publish a sibling without publishing other siblings
        //
        cms.publishResource(destination2);
        
        // the file must be now available in the online project
        cms.getRequestContext().setCurrentProject(onlineProject);
        try {
            cms.readResource(destination2);
        } catch (CmsException e) {
            fail("Resource " + destination2 + " not found in online project:" +e);
        }
        // the other siblings must not be available in the online project yet
        try {
            cms.readResource(destination3);
            fail("Resource " + destination3+ " should not available online yet");
        } catch (CmsVfsResourceNotFoundException e) {
            // ok
        } catch (CmsException e) {
            fail("Resource " + destination3 + " error:" +e);
        }
        try {
            cms.readResource(destination4);
            fail("Resource " + destination4+ " should not available online yet");
        } catch (CmsVfsResourceNotFoundException e) {
            // ok
        } catch (CmsException e) {
            fail("Resource " + destination4 + " error:" +e);
        }
        
        assertFilter(cms, destination2, OpenCmsTestResourceFilter.FILTER_PUBLISHRESOURCE);          
        
        // check if the file in the offline project is unchancged now
        cms.getRequestContext().setCurrentProject(offlineProject);
        assertState(cms, destination2, CmsResource.STATE_UNCHANGED);
        // the other siblings in the offline project must still be shown as new
        assertState(cms, destination3, CmsResource.STATE_NEW);
        assertState(cms, destination4, CmsResource.STATE_NEW);
        
        // publish a sibling and all other siblings of it
        //
        cms.publishResource(destination3, true, new CmsShellReport(cms.getRequestContext().getLocale()));
        // the file and its siblings must be now available in the online project
        cms.getRequestContext().setCurrentProject(onlineProject);
        try {
            cms.readResource(destination3);
        } catch (CmsException e) {
            fail("Resource " + destination3 + " not found in online project:" +e);
        }
        try {
            cms.readResource(destination4);
        } catch (CmsException e) {
            fail("Resource " + destination4 + " not found in online project:" +e);
        }
        assertFilter(cms, destination3, OpenCmsTestResourceFilter.FILTER_PUBLISHRESOURCE);  
        assertFilter(cms, destination4, OpenCmsTestResourceFilter.FILTER_PUBLISHRESOURCE);  
        
        // check if the file in the offline project is unchancged now
        cms.getRequestContext().setCurrentProject(offlineProject);
        assertState(cms, destination3, CmsResource.STATE_UNCHANGED);
        assertState(cms, destination4, CmsResource.STATE_UNCHANGED);
    }  
    
    /**
     * Test publishing files within a new unpublished folder.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    public void testPublishNewFilesInNewFolder() throws Throwable {
        
        CmsObject cms = getCmsObject();     
        echo("Testing publishing new files in new folder");
        
        String source = "/folder1/image1.gif";
        String newFolder = "/new_folder/";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本免费新一区视频| 亚洲地区一二三色| 久久精品亚洲麻豆av一区二区 | 7777女厕盗摄久久久| 色偷偷久久人人79超碰人人澡| 国产999精品久久| 丁香婷婷综合五月| aaa亚洲精品一二三区| www.在线欧美| 欧洲精品中文字幕| 欧美日韩在线播放三区四区| 欧美日韩亚洲另类| 欧美一级二级三级蜜桃| 日韩免费看的电影| 国产丝袜在线精品| 亚洲三级在线免费| 一区二区三区精品久久久| 五月婷婷激情综合| 国产一区二区三区在线观看精品| 国产精品一级片| 97国产精品videossex| 欧美私模裸体表演在线观看| 日韩欧美国产高清| 国产精品乱码一区二区三区软件 | 国产一区在线看| 99久久精品国产麻豆演员表| 欧美性一二三区| 日韩免费观看高清完整版| 久久亚洲捆绑美女| 1024成人网| 无码av免费一区二区三区试看| 毛片不卡一区二区| 99综合影院在线| 欧美一区二区三区成人| 国产欧美久久久精品影院| 亚洲一区在线观看免费| 精品一区在线看| 色又黄又爽网站www久久| 日韩精品中文字幕一区| 亚洲精品成人精品456| 国产麻豆9l精品三级站| 欧美日韩精品专区| 中文字幕在线一区免费| 美女在线观看视频一区二区| 一本一道综合狠狠老| 久久综合狠狠综合久久综合88| 亚洲一区二区在线免费观看视频| 国产精品一色哟哟哟| 欧美精品乱码久久久久久| 中文字幕久久午夜不卡| 美女一区二区三区在线观看| 欧美午夜不卡在线观看免费| 欧美激情在线观看视频免费| 美女看a上一区| 欧美日韩激情一区二区三区| 亚洲桃色在线一区| 成人午夜电影网站| 精品国产123| 青青草精品视频| 欧美日韩一级视频| 亚洲免费在线视频| 99精品视频在线播放观看| 久久综合色一综合色88| 日韩国产欧美一区二区三区| 在线观看一区二区精品视频| 日韩码欧中文字| 成人不卡免费av| 国产精品国产三级国产三级人妇 | 国产精品免费免费| 国产精品一区二区在线播放| 精品福利av导航| 老司机免费视频一区二区 | 26uuu成人网一区二区三区| 日韩不卡在线观看日韩不卡视频| 欧美系列一区二区| 亚洲影视资源网| 欧美日韩专区在线| 日韩国产欧美视频| 日韩欧美国产精品一区| 久久成人18免费观看| 久久久精品天堂| 成人毛片在线观看| 一区二区三区中文字幕| 欧美亚洲动漫另类| 婷婷成人激情在线网| 欧美v日韩v国产v| 精品中文字幕一区二区| 国产婷婷一区二区| 91免费在线播放| 亚洲国产aⅴ天堂久久| 欧美日本高清视频在线观看| 日本在线不卡视频| 久久精品一区二区| 色999日韩国产欧美一区二区| 亚洲视频在线一区二区| 欧美日韩黄视频| 精品一区二区三区视频在线观看| 久久精品水蜜桃av综合天堂| 不卡电影一区二区三区| 亚洲一级二级在线| 2欧美一区二区三区在线观看视频| 国产91露脸合集magnet| 亚洲一级二级三级| 精品久久久久香蕉网| 99久久精品情趣| 日本不卡视频一二三区| 中文字幕国产一区二区| 精品1区2区3区| 国产乱人伦偷精品视频免下载| 亚洲丝袜制服诱惑| 欧美大片免费久久精品三p| 本田岬高潮一区二区三区| 日韩精品色哟哟| 国产精品你懂的| 欧美va天堂va视频va在线| 91视频一区二区| 美女任你摸久久| 亚洲自拍偷拍网站| 国产精品丝袜一区| 欧美成人性战久久| 欧美日韩一区中文字幕| 99精品视频一区二区| 韩国理伦片一区二区三区在线播放| 亚洲精品大片www| 久久老女人爱爱| 日韩精品中文字幕一区二区三区| 色婷婷综合久色| 国产不卡高清在线观看视频| 日韩精品五月天| 亚洲一区二区三区四区不卡| 国产精品久久久久久亚洲毛片| 欧美成人精精品一区二区频| 欧美日韩成人在线一区| 在线国产电影不卡| 91免费小视频| 99久久99久久精品免费看蜜桃| 美日韩一区二区三区| 日韩中文字幕1| 午夜视频一区二区| 亚洲综合一二区| 亚洲欧美激情小说另类| 亚洲啪啪综合av一区二区三区| 国产女主播一区| 国产亚洲精品aa午夜观看| 日韩欧美精品在线| 日韩免费高清电影| 欧美精品v日韩精品v韩国精品v| 日本高清成人免费播放| 一本一本久久a久久精品综合麻豆| 成人性视频网站| 成人丝袜高跟foot| 99精品视频免费在线观看| av在线一区二区| 一本大道久久a久久综合| 91蜜桃在线观看| 日本黄色一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 99re成人精品视频| 色8久久精品久久久久久蜜| 色素色在线综合| 欧美日韩国产系列| 日韩视频一区在线观看| 精品国产一区二区三区忘忧草 | 欧美日韩卡一卡二| 欧美在线观看一区二区| 欧美日韩国产综合久久 | 精品无人区卡一卡二卡三乱码免费卡| 日本不卡高清视频| 国产精品一线二线三线| 91啪亚洲精品| 538在线一区二区精品国产| 欧美本精品男人aⅴ天堂| 国产午夜亚洲精品午夜鲁丝片| 国产精品不卡在线| 婷婷开心激情综合| 国产激情一区二区三区| 91热门视频在线观看| 91精品久久久久久久久99蜜臂| www一区二区| 夜夜揉揉日日人人青青一国产精品 | 国产精品网站在线播放| 一区二区在线观看视频在线观看| 天天综合日日夜夜精品| 国产麻豆精品久久一二三| 91国产福利在线| 精品裸体舞一区二区三区| 国产精品白丝在线| 蜜臀a∨国产成人精品| 91丨九色porny丨蝌蚪| 日韩免费观看高清完整版在线观看| 中文成人av在线| 丝袜美腿亚洲色图| 99re在线精品| 精品国产亚洲在线| 亚洲国产精品久久久久婷婷884 | 久久奇米777| 亚洲高清在线视频| 成人国产亚洲欧美成人综合网| 欧美性感一类影片在线播放| 国产欧美日本一区二区三区|