com.i2soft.active.v20230227.Hetero Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of i2up-java-sdk Show documentation
Show all versions of i2up-java-sdk Show documentation
Information2 United Data Management Platform SDK for Java
The newest version!
package com.i2soft.active.v20230227;
import com.i2soft.common.Auth;
import com.i2soft.http.I2Rs;
import com.i2soft.http.I2softException;
import com.i2soft.http.Response;
import com.i2soft.util.StringMap;
import java.util.Map;
public final class Hetero {
/**
* Auth 对象
*/
private final Auth auth;
/**
* 构建一个新对象
*
* @param auth Auth对象
*/
public Hetero(Auth auth) {
this.auth = auth;
}
/**
* 异构-消费-新建
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map createConsumerRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/rule", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 异构-消费-修改
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs modifyConsumerRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/rule", auth.cc_url);
Response r = auth.client.put(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-消费-删除
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map deleteConsumerRules(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/rule", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToMap();
}
/**
* 异构-消费-状态
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listConsumerStatus(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/status", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-消费-操作
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs stopConsumerRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-消费-获取规则列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listConsumerRules(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/viewtype", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-消费-获取单条规则
*
* @param uuid: uuid
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeConsumerRules(String uuid, StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer/%s", auth.cc_url, uuid);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-拓扑-新建
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs createHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-拓扑-添加
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs addHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/add", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-拓扑-获取列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-拓扑-运行拓扑
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs runHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/run", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-拓扑-停止拓扑
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs stopHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/stop", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-拓扑-状态
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listGraphStatus(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/status", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-拓扑-删除拓扑
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
@Deprecated
public I2Rs.I2SmpRs deleteHeteroGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-拓扑-拓扑详情
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map descriptGraphDetail(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/detail", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-拓扑图-获取拓扑图
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listGraph(StringMap args) throws I2softException {
String url = String.format("%s/hetero/graph/graph", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-新建(暂弃用)
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
@Deprecated
public I2Rs.I2SmpRs createHeteroRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero/rule", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-消费 (暂弃用)
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
@Deprecated
public I2Rs.I2SmpRs consumer(StringMap args) throws I2softException {
String url = String.format("%s/hetero/consumer", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-删除(暂弃用)
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
@Deprecated
public I2Rs.I2SmpRs deleteHeteroRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 异构-查看消费者(暂弃用)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
@Deprecated
public Map createConsumer(StringMap args) throws I2softException {
String url = String.format("%s/hetero/view_consumer", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 异构-查看topic(暂弃用)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
@Deprecated
public Map createHeteroTopic(StringMap args) throws I2softException {
String url = String.format("%s/hetero/topic", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 异构-获取列表(暂弃用)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
@Deprecated
public Map listHeteroRule(StringMap args) throws I2softException {
String url = String.format("%s/hetero/rule", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy