Adding rules for StorageHub

This commit is contained in:
Luca Frosini 2020-04-03 15:34:15 +02:00
parent 185e104127
commit e73126d5c2
6 changed files with 36 additions and 1 deletions

View File

@ -220,7 +220,7 @@ public class TestRules extends ContextTest {
allRules();
File rulesDirectory = getRulesDirectory();
File rulesDirFile = new File(rulesDirectory, "StorageHub");
File ruleFile = new File(rulesDirFile, "StorageHub-getVreFolderRecents.json");
File ruleFile = new File(rulesDirFile, "StorageHub-getById.json");
testRule(ruleFile);
}

View File

@ -0,0 +1,2 @@
DataAccess,StorageHub,/workspace/count
DataAccess,StorageHub,countById
1 DataAccess StorageHub /workspace/count
2 DataAccess StorageHub countById

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "StorageHub",
"calledMethodRegex": "(\/workspace\/count)|countById"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "StorageHub",
"calledMethod": "countById"
}
}

View File

@ -0,0 +1,8 @@
DataAccess,StorageHub,/workspace/40a3dd6c-2c47-4848-bb7b-462e532954a9/
DataAccess,StorageHub,/workspace/cb6a04d1-f94b-4c2f-90ed-18c1cee591bc
DataAccess,StorageHub,/workspace/item/29d9a102-802b-4775-b80d-a42730c643cb/
DataAccess,StorageHub,/workspace/item/40a3dd6c-2c47-4848-bb7b-462e532954a9/
DataAccess,StorageHub,/workspace/item/c99d26b6-e0bb-4a48-b32a-77056f49ddeb
DataAccess,StorageHub,/workspace/item/da558346-7d1a-4159-8780-a22e63f3c7dc/
DataAccess,StorageHub,/workspace/items/87bea023-3eed-445b-8c27-4d9d4e5921cc
DataAccess,StorageHub,getById
1 DataAccess StorageHub /workspace/40a3dd6c-2c47-4848-bb7b-462e532954a9/
2 DataAccess StorageHub /workspace/cb6a04d1-f94b-4c2f-90ed-18c1cee591bc
3 DataAccess StorageHub /workspace/item/29d9a102-802b-4775-b80d-a42730c643cb/
4 DataAccess StorageHub /workspace/item/40a3dd6c-2c47-4848-bb7b-462e532954a9/
5 DataAccess StorageHub /workspace/item/c99d26b6-e0bb-4a48-b32a-77056f49ddeb
6 DataAccess StorageHub /workspace/item/da558346-7d1a-4159-8780-a22e63f3c7dc/
7 DataAccess StorageHub /workspace/items/87bea023-3eed-445b-8c27-4d9d4e5921cc
8 DataAccess StorageHub getById

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "StorageHub",
"calledMethodRegex": "^\/workspace(\/item(s){0,1}){0,1}\/(?!(i$)|count|paged|v(re|ere|er)fo(ld|dl)ers{0,1}|((C|c)hi(dl|ld|d)ren))[0-9a-zA-Z\\-_]{1,}(\/){0,1}$|getById"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "StorageHub",
"calledMethod": "getById"
}
}

View File

@ -1,5 +1,6 @@
DataAccess,StorageHub,/list/byId
DataAccess,StorageHub,/list/byPath
DataAccess,StorageHub,/workspace/0ea656f2-0b86-411b-9711-00dba6261738/children
DataAccess,StorageHub,/workspace/a805998e-fa5a-4185-809c-72666f5f7ca7/chidlren
DataAccess,StorageHub,/workspace/a805998e-fa5a-4185-809c-72666f5f7ca7/children
DataAccess,StorageHub,/workspace/bc1c9525-43f7-4565-b5ea-0a0f9d7853a0/children

1 DataAccess StorageHub /list/byId
2 DataAccess StorageHub /list/byPath
3 DataAccess StorageHub /workspace/0ea656f2-0b86-411b-9711-00dba6261738/children
4 DataAccess StorageHub /workspace/a805998e-fa5a-4185-809c-72666f5f7ca7/chidlren
5 DataAccess StorageHub /workspace/a805998e-fa5a-4185-809c-72666f5f7ca7/children
6 DataAccess StorageHub /workspace/bc1c9525-43f7-4565-b5ea-0a0f9d7853a0/children