Commit 4bbd8ad5 authored by zhang's avatar zhang

update

parent baf1e950
......@@ -3,11 +3,9 @@ package com.tongda.tdpimssdk.api;
import com.alibaba.fastjson.JSONObject;
import com.tongda.tdpimssdk.auth.SaAuth;
import com.tongda.tdpimssdk.entities.Product;
import com.tongda.tdpimssdk.entities.common.CatalogRoot;
import com.tongda.tdpimssdk.http.PimHttpUtil;
import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
import javax.validation.constraints.NotBlank;
import java.util.List;
public class PimsAsset {
......@@ -41,7 +39,7 @@ public class PimsAsset {
* @param vo
* @return
*/
public String getLifeCycleDefinitionList(AssetVo vo) {
public String updateMetadataValues(AssetVo vo) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/field?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(vo));
String s=PimsQuery.resultUtil(response);
......
......@@ -4,7 +4,7 @@ import com.tongda.tdpimssdk.entities.AssetAbstract;
import com.tongda.tdpimssdk.entities.Entity;
import com.tongda.tdpimssdk.entities.common.Catalog;
import com.tongda.tdpimssdk.entities.common.CatalogRoot;
import com.tongda.tdpimssdk.remote.RemoteQueryHelper;
import com.tongda.tdpimssdk.remote.RemoteTdPimHelper;
import com.tongda.tdpimssdk.remote.RemoteSaAuthHandler;
import com.tongda.tdpimssdk.resultVo.vo.GeneralPagerVo;
......@@ -22,7 +22,7 @@ public class QuerySamples {
rsh.dbName="TXPIMDB";
//初始化远程查询对象
RemoteQueryHelper rqh = new RemoteQueryHelper(rsh);
RemoteTdPimHelper rqh = new RemoteTdPimHelper(rsh);
CatalogRoot cr = rqh.fetchAssetTemplates();
System.out.println(
......
......@@ -3,5 +3,5 @@ package com.tongda.tdpimssdk.remote;
import lombok.Data;
@Data
public class RemoteAppService {
public class RemoteAppConfiguration {
}
package com.tongda.tdpimssdk.remote;
public class RemoteAsset {
import com.tongda.tdpimssdk.entities.Product;
import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
public class RemoteAsset extends Product {
public String updateMetadataValues(AssetVo vo){
return "";
}
}
......@@ -10,10 +10,10 @@ import com.tongda.tdpimssdk.resultVo.vo.GeneralPagerVo;
import java.util.List;
public class RemoteQueryHelper {
public class RemoteTdPimHelper {
RemoteSaAuthHandler rsh;
public RemoteQueryHelper(RemoteSaAuthHandler rsh){
public RemoteTdPimHelper(RemoteSaAuthHandler rsh){
this.rsh = rsh;
}
/**
......@@ -86,6 +86,45 @@ public class RemoteQueryHelper {
}
public void createAsset(){
}
public void deleteAsset(){
}
public RemoteAsset fetchAsset(){
return null;
}
public void createDocument(){
}
public void deleteDocument(){
}
public RemoteDocument fetchDocument(){
return null;
}
public void createAppConfiguration(){
}
public void createDeleteConfiguration(){
}
public RemoteAppConfiguration fetchAppConfiguration(){
return null;
}
public static String resultUtil(String re){
// System.out.println(re);
JSONObject jsonObject=JSONObject.parseObject(re);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment