复制指标模型
接口调用示例
import smartbi.net.sf.json.JSONObject;
import smartbi.sdk.ClientConnector;
import smartbi.sdk.InvokeResult;
public class MetricsModelDuplicateDemo {
public static void main(String[] args) {
// 用户名
String user = "admin";
// 密码
String password = "admin";
// Smartbi链接http://10.10.35.85:18080/smartbi
String smartbiURL = "http://localhost:8080/smartbi";
// 创建Smartbi链接对象
ClientConnector conn = new ClientConnector(smartbiURL);
// 建立此连接时,就对smartbi进行了登录
boolean ret = conn.open(user, password);
String body = "参考下面post的内容";
// body内容参考下文MetricsModelDuplicateConfig
JSONObject obj = JSONObject.fromString(str);
// 复制指标模型模型
InvokeResult res = conn.remoteInvoke("MetricsModelForVModule", "copyAndPaste", new Object[]{body});
conn.close();
}
}