Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
TDPIMS-SDK
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengfunan
TDPIMS-SDK
Commits
82f7ad21
Commit
82f7ad21
authored
Jul 24, 2023
by
zhengfunan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除不需要的类
parent
6c9addfd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
452 deletions
+0
-452
PimsAsset.java
src/main/java/com/tongda/tdpimssdk/api/PimsAsset.java
+0
-66
PimsBusiness.java
src/main/java/com/tongda/tdpimssdk/api/PimsBusiness.java
+0
-124
PimsDocument.java
src/main/java/com/tongda/tdpimssdk/api/PimsDocument.java
+0
-80
PimsQuery.java
src/main/java/com/tongda/tdpimssdk/api/PimsQuery.java
+0
-89
SaAuth.java
src/main/java/com/tongda/tdpimssdk/auth/SaAuth.java
+0
-93
No files found.
src/main/java/com/tongda/tdpimssdk/api/PimsAsset.java
deleted
100644 → 0
View file @
6c9addfd
//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.http.PimHttpUtil;
//import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
//
//import java.util.List;
//
//public class PimsAsset {
//
// /**
// * 新建资产
// * @param vo
// * @return
// */
// public String pimsTemplate(AssetVo vo){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendPost(this.rsh.saToken,url,(JSONObject)JSONObject.toJSON(vo));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 查询资产详情
// * @param id
// * @return
// */
// public List<Product> getAssetContent(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/details?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.sendGet(this.rsh.saToken,url);
// String s=PimsQuery.resultUtil(response);
// return JSONObject.parseArray(s,Product.class);
// }
//
// /**
// * 修改资产或文档属性(字段)
// * @param vo
// * @return
// */
// 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);
// return s;
// }
//
// /**
// * 删除资产
// * @param id
// * @return
// */
// public String deleteAsset(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.sendDelete(url);
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
//
//
//
//
//
//}
src/main/java/com/tongda/tdpimssdk/api/PimsBusiness.java
deleted
100644 → 0
View file @
6c9addfd
//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.entities.common.Team2;
//import com.tongda.tdpimssdk.http.PimHttpUtil;
//import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
//import com.tongda.tdpimssdk.resultVo.vo.CatalogItem;
//import com.tongda.tdpimssdk.resultVo.vo.TeamVo;
//
//import java.util.List;
//
//public class PimsBusiness {
//
// /**
// * 新建业务
// * @param teamVo
// * @return
// */
// public String createBusiness(TeamVo teamVo){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendPost(this.rsh.saToken,url,(JSONObject)JSONObject.toJSON(teamVo));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 查询业务详情
// * @param id
// * @return
// */
// public List<Team2> getBusinessDetails(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/details?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.sendGet(url);
// String s=PimsQuery.resultUtil(response);
// return JSONObject.parseArray(s,Team2.class);
// }
//
// /**
// * 查询目录下资产列表
// * @param id
// * @return
// */
// public List<CatalogRoot> queryAssetByCatalog(String id, String catalogID) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/details?dbName="+SaAuth.dbName+"&id="+id+"&catalogID="+catalogID;
// String response= PimHttpUtil.sendGet(url);
// String s=PimsQuery.resultUtil(response);
// return JSONObject.parseArray(s,CatalogRoot.class);
// }
//
// /**
// * 修改资产或文档属性(字段)
// * @param vo
// * @return
// */
// public String getLifeCycleDefinitionList(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);
// return s;
// }
//
// /**
// * 删除业务
// * @param id
// * @return
// */
// public String deleteTeam(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName;
// TeamVo teamVo=new TeamVo();
// teamVo.setTeamID(id);
// String response= PimHttpUtil.sendDeleteBody(url,(JSONObject)JSONObject.toJSON(teamVo));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 将资源从业务团队中移除
// * {
// * "dbName": "TXPIMDB",
// * "id": "Team2-1125463491344334848",
// * "assetID": "Product-1125819770889830400"
// * }
//
// * @return
// */
// public String removeAssetFromTeam(CatalogItem item) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/asset?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendDeleteBody(url,(JSONObject)JSONObject.toJSON(item));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
//
// /**
// * 修改资产或文档属性(字段)
// * @param item
// * @return
// */
// public String addAssetRefToTeam(CatalogItem item) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/asset?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(item));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
//
//
// public static String remove="{\n" +
// " \"dbName\": \"TXPIMDB\",\n" +
// " \"id\": \"Team2-1125463491344334848\",\n" +
// " \"assetID\": \"Product-1126119026813042688\"\n" +
// "}";
// public static String create="{\n" +
// " \"userId\": \"EndUser-1128343251971997696\",\n" +
// " \"label\": \"test16\",\n" +
// " \"desc\": \"test\",\n" +
// " \"lifecycleID\": \"TDLifeCycleDefinition-Common\"\n" +
// "}";
//
//
//}
src/main/java/com/tongda/tdpimssdk/api/PimsDocument.java
deleted
100644 → 0
View file @
6c9addfd
//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.Resource;
//import com.tongda.tdpimssdk.http.PimHttpUtil;
//import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
//
//import java.io.File;
//import java.util.List;
//
//public class PimsDocument {
//
// /**
// * 新建文档
// * @param vo
// * @return
// */
// public String createDocumentAsset(AssetVo vo){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/document?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendPost(this.rsh.saToken,url,(JSONObject)JSONObject.toJSON(vo));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 查询文档详情
// * @param id
// * @return
// */
// public List<Resource> getDocumentContent(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/document/content?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.sendGet(url);
// String s=PimsQuery.resultUtil(response);
// return JSONObject.parseArray(s,Resource.class);
// }
//
// /**
// * 修改资产或文档属性(字段)
// * @param vo
// * @return
// */
// public String getLifeCycleDefinitionList(AssetVo vo) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/document/field?dbName="+SaAuth.dbName;
// String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(vo));
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 删除文档
// * @param id
// * @return
// */
// public String deleteAsset(String id) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/document?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.sendDelete(url);
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
// /**
// * 上传文档
// * @param id
// * @param file
// * @return
// */
// public String uploadBinary(String id, File file) {
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/document/upload?dbName="+SaAuth.dbName+"&id="+id;
// String response= PimHttpUtil.uploadFile(url,file);
// String s=PimsQuery.resultUtil(response);
// return s;
// }
//
//
//
//
//
//}
src/main/java/com/tongda/tdpimssdk/api/PimsQuery.java
deleted
100644 → 0
View file @
6c9addfd
//package com.tongda.tdpimssdk.api;
//
//import com.alibaba.fastjson.JSONObject;
//import com.alibaba.fastjson.TypeReference;
//import com.tongda.tdpimssdk.auth.SaAuth;
//import com.tongda.tdpimssdk.entities.AssetAbstract;
//import com.tongda.tdpimssdk.entities.Entity;
//import com.tongda.tdpimssdk.entities.common.CatalogRoot;
//import com.tongda.tdpimssdk.http.PimHttpUtil;
//import com.tongda.tdpimssdk.resultVo.vo.GeneralPagerVo;
//
//import java.util.List;
//
//public class PimsQuery {
//
// /**
// * 查询资产模型清单
// * @return
// */
// public List<CatalogRoot> pimsTemplate(){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/template?dbName="+SaAuth.dbName;
// String response=PimHttpUtil.sendGet(url);
// String s=resultUtil(response);
// return JSONObject.parseArray(s,CatalogRoot.class);
// }
//
// /**
// * 查询文档模型清单
// * @return
// */
// public List<CatalogRoot> queryDocumentList(){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/template/document?dbName="+SaAuth.dbName;
// String response=PimHttpUtil.sendGet(url);
// String s=resultUtil(response);
// return JSONObject.parseArray(s,CatalogRoot.class);
// }
//
// /**
// * 根据模型ID查询资产/文档清单
// * @param templateID
// * @param page
// * @param size
// * @return
// */
// public GeneralPagerVo<AssetAbstract> getAssetByTemplate(String templateID, int page, int size){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset?dbName="+SaAuth.dbName+"&templateID="+templateID+"&page="+page+"&size="+size;
// String response=PimHttpUtil.sendGet(url);
// String s=resultUtil(response);
// return JSONObject.parseObject(s,new TypeReference<GeneralPagerVo<AssetAbstract>>(){});
// }
//
// /**
// * 查询资产所属业务
// * @param id
// * @return
// */
// public List<Entity> queryAssetAppViewPath(String id){
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/business/path?dbName="+SaAuth.dbName+"&id="+id;
// String response=PimHttpUtil.sendGet(url);
// String s=resultUtil(response);
// return JSONObject.parseArray(s,Entity.class);
// }
//
// /**
// * 查询业务清单
// * @return
// */
// public List<Entity> getBusinessList(String label) {
//
// String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName+"&label="+label;
// String response=PimHttpUtil.sendGet(url);
// String s=resultUtil(response);
// return JSONObject.parseArray(s,Entity.class);
// }
//
//
// public static String resultUtil(String re){
//// System.out.println(re);
// JSONObject jsonObject=JSONObject.parseObject(re);
// if (jsonObject.get("code").toString().equals("200")){
// return jsonObject.get("data").toString();
// }else {
// throw new RuntimeException("调用接口异常:"+re);
// }
//
// }
//
//
//}
src/main/java/com/tongda/tdpimssdk/auth/SaAuth.java
deleted
100644 → 0
View file @
6c9addfd
//package com.tongda.tdpimssdk.auth;
//
//import com.tongda.tdpimssdk.api.PimsAsset;
//import com.tongda.tdpimssdk.api.PimsBusiness;
//import com.tongda.tdpimssdk.api.PimsDocument;
//import com.tongda.tdpimssdk.api.PimsQuery;
//import com.tongda.tdpimssdk.http.PimHttpUtil;
//import lombok.Data;
//
//@Data
//public class SaAuth {
//
// public static String user;
// public static String password;
// public static String id;
// public static int port;
// public static String satoken;
// public static String serverId;
// public static int serverPort;
// public static String dbName;
//
// public SaAuth(String user, String password, String id, int port) {
// this.user = user;
// this.password = password;
// this.id = id;
// this.port = port;
// }
//
// public static String loginGetSatoken(){
// String url="http://"+id+":"+port+"/sso/doLogin";
// satoken=PimHttpUtil.loginGetSaToken(url,user,password);
// return satoken;
// }
//
// public static void main(String[] args) {
//
// SaAuth.serverId="150.158.75.213";
// SaAuth.serverPort=8080;
// SaAuth.dbName="TXPIMDB";
// SaAuth saAuth=new SaAuth("guantiantian","q1w2e3r4","121.199.160.117",9000);
// String satoken=SaAuth.loginGetSatoken();
// System.out.println(satoken);
//
// PimsQuery pimsQuery =new PimsQuery();
//// //查询5个接口
//// System.out.println(pimsQuery.pimsTemplate());
////
// // System.out.println(pimsQuery.queryDocumentList());
////
//// System.out.println(pimsQuery.getBusinessList(""));
////
//// System.out.println(pimsQuery.getAssetByTemplate("ProductTemplate-1125744743611891712",1,20));
////
//// System.out.println(pimsQuery.queryAssetAppViewPath("Product-1128330059979948032"));
//
// PimsAsset pimsAsset=new PimsAsset();
//// System.out.println(pimsAsset.pimsTemplate(JSONObject.parseObject(PimsAsset.create, AssetVo.class)));
////
//// System.out.println(pimsAsset.getAssetContent("Product-1129500005887901696"));
////
//// System.out.println(pimsAsset.getLifeCycleDefinitionList(JSONObject.parseObject(PimsAsset.update, AssetVo.class)));
////
//// System.out.println(pimsAsset.deleteAsset("Product-1129500005887901696"));
// PimsDocument pimsDocument=new PimsDocument();
//
//// System.out.println(pimsDocument.createDocumentAsset(JSONObject.parseObject(PimsDocument.create, AssetVo.class)));
////
//// System.out.println(pimsDocument.getDocumentContent("Resource-1129786933577252864"));
////
//// System.out.println(pimsDocument.getLifeCycleDefinitionList(JSONObject.parseObject(PimsDocument.update, AssetVo.class)));
////
//// System.out.println(pimsDocument.deleteAsset("Resource-1129433907997966336"));
//
// PimsBusiness pimsBusiness=new PimsBusiness();
//
//// System.out.println(pimsBusiness.createBusiness(JSONObject.parseObject(PimsBusiness.create, TeamVo.class)));
////
//// System.out.println(pimsBusiness.getBusinessDetails("Team2-1129450504951169024"));
////
//// System.out.println(pimsBusiness.deleteTeam("Team2-1129450504951169024"));
////
//// System.out.println(pimsBusiness.queryAssetByCatalog("Team2-1129497138993037312","CatalogAppView-1129455551755845632"));
////
//// System.out.println(pimsBusiness.removeAssetFromTeam(JSONObject.parseObject(PimsBusiness.remove, CatalogItem.class)));
////
//// System.out.println(pimsBusiness.addAssetRefToTeam(JSONObject.parseObject(PimsBusiness.remove, CatalogItem.class)));
//
//// File file=new File("C:\\Users\\zfn\\Desktop\\新建 文本文档1.txt");
//// System.out.println(pimsDocument.uploadBinary("Resource-1126839993566756864",file));
//
//
// }
//}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment