module RepoDetail{ export function getControlProxyConfig(){ return org.bdware.sc.controlproxy.RepoProxy.getConfig(); } //@wyq 通过DOIP请求 export function getAuditRule(arg){ // {"repoId":"xxx"} var ret = []; ret.push({"displayName":"原始数据存证","desc":"原始数据存证到指定数据库,哈希数据存证","type":2}); ret.push({"displayName":"哈希数据存证","desc":"仅哈希数据存证","type":1}); ret.push({"displayName":"不存证","desc":"不存证","type":0 }); return ret; } //@wyq TODO TODO // 这个通过DOIPUtil,去调用 // DOIP的接口。 @Description("{\"doId\":\"macjw.ab/repofile\"}"); export function getDoAuditRule(arg){ arg = convertArgToJson(arg); if(arg.count==undefined) arg.count=10; if(arg.offset==undefined) arg.offset=0; return org.bdware.sc.controlproxy.RepoProxy.getDoAuditRule(arg); } //@wyq export function setDoAuditRule(arg){ ///arg={"doIdList":["dd","ddd.xx/xxx",...],"type":1} arg = convertArgToJson(arg); if(arg.count==undefined) arg.count=10; if(arg.offset==undefined) arg.offset=0; return {"msg":"success","code":0}; } //宏伟 //如果有指定repo,那就是指定repo的DOlist。 //如果没指定repo,那就是全部的。 //这是search engine的接口,为什么还没接上?? //TODO TODO export function getDoList(arg){ print("GetDOList==========="); var ret = executeContract("SearchEngine","getDoList",arg); return ret.result; } export function getDoList2(arg){ arg = convertArgToJson(arg); //if (arg.doId == null) // return { // "msg":"missing arguments doId", "code":1, params: arg // }; //if (arg.count>1000) // return { // "msg":"request to much!", "code":1 // }; var ret = []; if(arg.count==undefined) arg.count=10; if(arg.offset==undefined) arg.offset=0; for (var i=arg.offset; i