ソースを参照

添加必要的注释

lin.chen 6 年 前
コミット
c3793a7576

+ 21 - 5
TRS.WCM.Developer/test/com/trs/web2frame/WCMServiceCallerTest.java

@@ -69,6 +69,9 @@ public class WCMServiceCallerTest extends TestCase {
         }
     }
 
+    /**
+     * 查询站点的例子
+     */
 	public void testCall() {
 		String sServiceId = "gov_site";
 		String sMethodName = "querySites";
@@ -82,6 +85,7 @@ public class WCMServiceCallerTest extends TestCase {
 		System.out.println("Result:" + oResult.getResponseText());
 	}
 
+	/**
 	public void testCallback() {
 		String sServiceId = "wcm6_document";
 		String sMethodName = "query";
@@ -127,6 +131,7 @@ public class WCMServiceCallerTest extends TestCase {
 		WCMServiceCaller.Call(oServiceObject, false);
 	}
 
+
 	public void testCall2() {
 		String sServiceId = "wcm6_document";
 		String sMethodName = "query";
@@ -148,7 +153,12 @@ public class WCMServiceCallerTest extends TestCase {
 		System.out.println(
 				"oDispatch.getResponseText():" + oDispatch.getResponseText());
 	}
+     **/
+
 
+    /**
+     * 文件上传的例子
+     */
 	public void testUploadFile() {
 		Dispatch oDispatch = WCMServiceCaller.UploadFile(FILE_1);
 		System.out.println(
@@ -157,7 +167,13 @@ public class WCMServiceCallerTest extends TestCase {
 				+ oDispatch.getUploadShowName());
 	}
 
-	public void testPost() {
+
+    /**
+     * 保存文档的例子(自定义视图)
+     * 1、自定义视图:sServiceId = gov_webdocument, sMethodName = saveDocumentInOpenData
+     * 2、默认的资讯视图:sServiceId = gov_webdocument, sMethodName = saveDocumentInWeb
+     */
+	public void testSaveOpenData() {
 		String sServiceId = "gov_webdocument";
 		String sMethodName = "saveDocumentInOpenData";
 
@@ -195,7 +211,7 @@ public class WCMServiceCallerTest extends TestCase {
 	}
 
     /**
-     * 站点迁移
+     * 批量迁移站点的例子,站点需要项目组自己根据实际情况获取
      * @throws WCMException
      */
     public void testPostSaveSite() throws WCMException {
@@ -230,10 +246,10 @@ public class WCMServiceCallerTest extends TestCase {
     }
 
     /**
-     * 栏目迁移
+     * 栏目迁移的例子
      * @throws WCMException
      */
-    public void testPostSaveChannel() throws WCMException {
+    public void testSaveChannel() throws WCMException {
 
         List<ChannelDTO> list = new ArrayList<>();
 
@@ -296,7 +312,7 @@ public class WCMServiceCallerTest extends TestCase {
     }
 
     /**
-     * 海云批量保存站点
+     * 批量迁移站点的例子
      * @param siteDTOList
      */
     private void testSaveSite(List<SiteDTO> siteDTOList) throws WCMException {