forked from iod/ControlProxy
80 lines
3.2 KiB
Plaintext
80 lines
3.2 KiB
Plaintext
module ShanxiRegistry{
|
|
export function getAllRepoCount() {
|
|
return executeContract("ShanxiRegistry","getAllRepoCount",arg).result;
|
|
}
|
|
export function getAllDoCount() {
|
|
return executeContract("ShanxiRegistry","getAllDoCount",arg).result;
|
|
}
|
|
export function getAllSearchCount() {
|
|
return executeContract("ShanxiRegistry","getAllSearchCount",arg).result;
|
|
}
|
|
export function getIndexStatistics() {
|
|
return executeContract("ShanxiRegistry","getIndexStatistics",arg).result;
|
|
}
|
|
export function getRepoList() {
|
|
return executeContract("ShanxiRegistry","getRepoList",arg).result;
|
|
}
|
|
export function pingRepo() {
|
|
return executeContract("ShanxiRegistry","pingRepo",arg).result;
|
|
}
|
|
export function addRepoToRegistry() {
|
|
return executeContract("ShanxiRegistry","addRepoToRegistry",arg).result;
|
|
}
|
|
export function deleteRepoList() {
|
|
return executeContract("ControlProxy","deleteRepoList",arg).result;
|
|
}
|
|
export function listDataRequirement() {
|
|
return executeContract("ShanxiRegistry","listDataRequirement",arg).result;
|
|
}
|
|
export function createDataRequirement() {
|
|
return executeContract("ShanxiRegistry","createDataRequirement",arg).result;
|
|
}
|
|
export function issueDataRequirement() {
|
|
return executeContract("ShanxiRegistry","issueDataRequirement",arg).result;
|
|
}
|
|
export function updateDataRequirement() {
|
|
return executeContract("ShanxiRegistry","updateDataRequirement",arg).result;
|
|
}
|
|
export function getDataRequirement() {
|
|
return executeContract("ShanxiRegistry","getDataRequirement",arg).result;
|
|
}
|
|
export function deleteDataRequirement() {
|
|
return executeContract("ShanxiRegistry","deleteDataRequirement",arg).result;
|
|
}
|
|
export function getDoCount(arg) {
|
|
var ret = executeContract("ShanxiRegistry", "getDoCount", arg);
|
|
if (arg.indexOf("shanxi/Repository") != - 1)
|
|
ret.result.data.push({
|
|
"doId" : "shanxi/Repository", "count" : 3
|
|
});
|
|
return ret.result;
|
|
}
|
|
export function addSubRegistry() {
|
|
return executeContract("ShanxiRegistry","addSubRegistry",arg).result;
|
|
}
|
|
export function deleteSubRegistry() {
|
|
return executeContract("ShanxiRegistry","deleteSubRegistry",arg).result;
|
|
}
|
|
export function listSubRegistry() {
|
|
return executeContract("ShanxiRegistry","listSubRegistry",arg).result;
|
|
}
|
|
export function getRelationInfo() {
|
|
return executeContract("ShanxiRegistry","getRelationInfo",arg).result;
|
|
}
|
|
@ArgSchema({
|
|
"!params" : [{
|
|
"!type" : "string", "!keyword" : "integer"
|
|
}], "count" : "integer", "offset" : "integer"
|
|
})
|
|
export function search(arg) {
|
|
arg = convertArgToJson(arg);
|
|
var req = {"id":"","attributes":{},"body":""};
|
|
for (var i=0;i<arg.params.length;i++){
|
|
req.attributes[arg.params[i].type] = arg.params[i].keyword;
|
|
}
|
|
req.attributes["offset"] = arg.offset;
|
|
req.attributes["count"] = arg.count;
|
|
var res = executeContract("ShanxiRegistry", "search", arg);
|
|
return res.result;
|
|
}
|
|
} |