diff --git a/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java b/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java index 754d88b..4b51871 100644 --- a/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java +++ b/src/test/java/org/gcube/accounting/datamodel/validations/validators/TestRules.java @@ -191,6 +191,7 @@ public class TestRules extends ContextTest { for(AggregatedServiceUsageRecord asur : aggregatedMap.values()) { try { asur.aggregate(sur); + logger.error("The record {} has been aggregated and it should NOT", sur); throw new Exception("The record has been aggregated and it should NOT"); } catch(NotAggregatableRecordsExceptions e) { //logger.trace("{} is not aggragable as expected", sur); @@ -210,8 +211,8 @@ public class TestRules extends ContextTest { public void testSingleRule() throws Exception { allRules(); File rulesDirectory = getRulesDirectory(); - File rulesDirFile = new File(rulesDirectory, "GeoServer"); - File rulesFile = new File(rulesDirFile, "GeoServer_PROTOCOL.json"); + File rulesDirFile = new File(rulesDirectory, "GeoNetwork"); + File rulesFile = new File(rulesDirFile, "GeoNetwork-OTHER.json"); testRule(rulesFile); } diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv new file mode 100644 index 0000000..1986478 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.csv @@ -0,0 +1,228 @@ +SDI,GeoNetwork,/srv/eng/ +SDI,GeoNetwork,/login.jsp +SDI,GeoNetwork,/srv/fre/admin.format.clear +SDI,GeoNetwork,/srv/eng/md.formatter.files +SDI,GeoNetwork,/srv/en/user.resetpw +SDI,GeoNetwork,/srv/en/xml.harvesting.add +SDI,GeoNetwork,/srv/fre/admin.schematrontype +SDI,GeoNetwork,/srv/eng/md.processing.batch.report +SDI,GeoNetwork,/srv/fre/admin.schematrontype@json +SDI,GeoNetwork,/srv/en/xml.metadata.select +SDI,GeoNetwork,/srv/eng/metadataIdentifierTemplates +SDI,GeoNetwork,/srv/eng/admin.config.csw +SDI,GeoNetwork,/srv/eng/rfmos_convention_areas_fao.zip +SDI,GeoNetwork,/srv/eng/service-not-allowed +SDI,GeoNetwork,/srv/fre/admin.config.csw.customelementset +SDI,GeoNetwork,/srv/en/links +SDI,GeoNetwork,/srv/en/main.home +SDI,GeoNetwork,/srv/spa/md.relations +SDI,GeoNetwork,/srv/spa/qi +SDI,GeoNetwork,/warninghealthcheck +SDI,GeoNetwork,/srv/api/regions +SDI,GeoNetwork,/srv/api/records/templates +SDI,GeoNetwork,/srv/api/users/1 +SDI,GeoNetwork,/srv/en/xml.user.logout +SDI,GeoNetwork,/srv/api/users/353 +SDI,GeoNetwork,/srv/en +SDI,GeoNetwork,/srv/en/ +SDI,GeoNetwork,/srv/en/0 +SDI,GeoNetwork,/srv/en/uuid=fao-geographic-proximity-tool +SDI,GeoNetwork,/srv/en/metadata.elem.add +SDI,GeoNetwork,/srv/en/test.csw +SDI,GeoNetwork,/criticalhealthcheck +SDI,GeoNetwork,/home +SDI,GeoNetwork,/srv/eng/region.getmap.png +SDI,GeoNetwork,/srv/en/rating.popup +SDI,GeoNetwork,/srv/en/rss.latest +SDI,GeoNetwork,/srv/fre/admin.index.config.reload +SDI,GeoNetwork,/srv/fre/admin.index.optimize +SDI,GeoNetwork,/srv/en/thesaurus.admin +SDI,GeoNetwork,/srv/en/transfer.ownership +SDI,GeoNetwork,/srv/fre/admin.index.rebuild +SDI,GeoNetwork,/srv/fre/admin.load.samples +SDI,GeoNetwork,/srv/fre/admin.load.templates +SDI,GeoNetwork,/srv/en/user.login +SDI,GeoNetwork,/srv/fre/admin.logo.upload +SDI,GeoNetwork,/srv/en/user.logout +SDI,GeoNetwork,/srv/fre/admin.ownership.groups +SDI,GeoNetwork,/srv/eng/md.privileges +SDI,GeoNetwork,/srv/en/config +SDI,GeoNetwork,/srv/eng/md.processing.batch +SDI,GeoNetwork,/srv/eng/md.relations +SDI,GeoNetwork,/srv/eng/md.relations@json +SDI,GeoNetwork,/srv/eng/md.validate +SDI,GeoNetwork,/srv/eng/md.viewer +SDI,GeoNetwork,/srv/fre/admin.user +SDI,GeoNetwork,/srv/eng/metadata.admin +SDI,GeoNetwork,/srv/en/xml.ownership.groups +SDI,GeoNetwork,/srv/eng/metadata.select +SDI,GeoNetwork,/srv/eng/q +SDI,GeoNetwork,/srv/eng/qi +SDI,GeoNetwork,/srv/eng/admin.config.csw.customelementset +SDI,GeoNetwork,/srv/eng/admin.config.save +SDI,GeoNetwork,/srv/en/csw/ +SDI,GeoNetwork,/srv/en/csw/vre/prv/$ +SDI,GeoNetwork,/srv/en/feedback +SDI,GeoNetwork,/srv/api/sources +SDI,GeoNetwork,/srv/en/google.kml +SDI,GeoNetwork,/srv/eng/admin.console +SDI,GeoNetwork,/srv/eng/admin.format.clear +SDI,GeoNetwork,/srv/fre/admin.config.csw +SDI,GeoNetwork,/srv/en/harvesting +SDI,GeoNetwork,/srv/en/home +SDI,GeoNetwork,/srv/en/iso19110.xml +SDI,GeoNetwork,/srv/eng/admin.index.config.reload +SDI,GeoNetwork,/srv/en/iso19139.xml +SDI,GeoNetwork,/srv/eng/admin.index.optimize +SDI,GeoNetwork,/srv/ita/catalog.signin +SDI,GeoNetwork,/srv/eng/admin.index.rebuild +SDI,GeoNetwork,/srv/ita/metadata.select +SDI,GeoNetwork,/srv/ita/q +SDI,GeoNetwork,/srv/en/main.present +SDI,GeoNetwork,/srv/fre/admin.config.save +SDI,GeoNetwork,/srv/fre/admin.console +SDI,GeoNetwork,/srv/en/main.present.embedded +SDI,GeoNetwork,/srv/eng/admin.user +SDI,GeoNetwork,/srv/en/mef.export +SDI,GeoNetwork,/srv/spa/metadata.select +SDI,GeoNetwork,/srv/spa/q +SDI,GeoNetwork,/srv/en/mef.import.ui +SDI,GeoNetwork,/srv/en/metadata.admin +SDI,GeoNetwork,/srv/v2/api-docs +SDI,GeoNetwork,/srv/en/metadata.admin.form +SDI,GeoNetwork,/srv/en/metadata.admin.index.optimize +SDI,GeoNetwork,/srv/eng/admin.user.resetpassword +SDI,GeoNetwork,/srv/en/metadata.samples.add +SDI,GeoNetwork,//srv/fre/q +SDI,GeoNetwork,/srv/fre/mef.export +SDI,GeoNetwork,/srv/fre/qi +SDI,GeoNetwork,/srv/api/selections/s101 +SDI,GeoNetwork,/srv/api/site +SDI,GeoNetwork,/srv/fre/qi@json +SDI,GeoNetwork,/srv/en/metadata.admin.index.rebuild +SDI,GeoNetwork,/srv/en/metadata.admin.index.rebuildxlinks +SDI,GeoNetwork,/srv/api/site/settings +SDI,GeoNetwork,/login.jsp;jsessionid=026438CEE6D095C440E30AA2BE5F1C52 +SDI,GeoNetwork,/srv/en/xml.user.login +SDI,GeoNetwork,/srv/api/standards +SDI,GeoNetwork,/srv/api/tags +SDI,GeoNetwork,/srv/api/users +SDI,GeoNetwork,/login.jsp;jsessionid=071014EEDB6B2BC471117DDE9DBAB4AF +SDI,GeoNetwork,/srv/fre/md.format.pdf +SDI,GeoNetwork,/srv/fre/md.format.xml +SDI,GeoNetwork,/srv/api/users/1/groups +SDI,GeoNetwork,/srv/fre/md.formatter.files +SDI,GeoNetwork,/srv/en/metadata.templates.add.default +SDI,GeoNetwork,/srv/eng +SDI,GeoNetwork,/srv/api/users/353/groups +SDI,GeoNetwork,/srv/csw +SDI,GeoNetwork,/srv/fre/md.privileges +SDI,GeoNetwork,/srv/en/metadata.select +SDI,GeoNetwork,/srv/fre/lang@json +SDI,GeoNetwork,/srv/fre/md.processing.batch.report +SDI,GeoNetwork,/login.jsp;jsessionid=101C308122D54162E5974173C3AC9470 +SDI,GeoNetwork,/srv/fre/ +SDI,GeoNetwork,/srv/fre/md.relations +SDI,GeoNetwork,/srv/eng/md.format.xml +SDI,GeoNetwork,/srv/fre/md.relations@json +SDI,GeoNetwork,/srv/eng/qi@json +SDI,GeoNetwork,/srv/fre/md.validate +SDI,GeoNetwork,/srv/en/xml.config.set +SDI,GeoNetwork,/srv/fre/md.validate@json +SDI,GeoNetwork,/login.jsp;jsessionid=1AA1F8CF444ACF53A7ED35545739182B +SDI,GeoNetwork,/login.jsp;jsessionid=3A65F66FF8562EEB67A950B0E34B210D +SDI,GeoNetwork,/login.jsp;jsessionid=3FE0648A84FFE76EDF27E3ABA1F38FE0 +SDI,GeoNetwork,/login.jsp;jsessionid=40DAC33C14635BC810F8D849D245CF64 +SDI,GeoNetwork,/login.jsp;jsessionid=45C2F7FBBD72D44E1B41124FF2ECC4FB +SDI,GeoNetwork,/login.jsp;jsessionid=5502E052F453E2B5635B0AAB1FE2F58C +SDI,GeoNetwork,/login.jsp;jsessionid=5F2723D37357C263AA231D6400370DA6 +SDI,GeoNetwork,/login.jsp;jsessionid=5F54FEA2C8F69CFFB1C71F9C2B338025 +SDI,GeoNetwork,/login.jsp;jsessionid=9A9062700CB06003619AEEF2D636A8E9 +SDI,GeoNetwork,/login.jsp;jsessionid=9D78B2D26010B4BD674AB859CD6A6EB0 +SDI,GeoNetwork,/login.jsp;jsessionid=9DB16E206EBBEDB8DB5DE7076FDB45DD +SDI,GeoNetwork,/login.jsp;jsessionid=AD1D6B3B90A448CC87E32EEEA7D1877B +SDI,GeoNetwork,/login.jsp;jsessionid=D8912146C70588E4AA18B235B58B50E6 +SDI,GeoNetwork,/login.jsp;jsessionid=E3A90B917D7C8B71D386F6B6834D7486 +SDI,GeoNetwork,/login.jsp;jsessionid=F0DCF3AD6DCEF95EBCB6C20C2FDD6146 +SDI,GeoNetwork,/login.jsp;jsessionid=F162A6D953B374097AEC9E0A9201BD1A +SDI,GeoNetwork,/login.jsp;jsessionid=F19134D6E23F6DD6C8F6CB7536052EC2 +SDI,GeoNetwork,/login.jsp;jsessionid=F25F1AA1630EA3E955F3CEFEE3732853 +SDI,GeoNetwork,/srv/eng/cswrequest=GetCapabilities&service=CSW&acceptVersions=2.0.2&acceptFormats=application/xml +SDI,GeoNetwork,/proxy +SDI,GeoNetwork,/srv/NA/metadata.admin +SDI,GeoNetwork,/srv/NA/xml.user.login +SDI,GeoNetwork,/srv/api/0.1/groups +SDI,GeoNetwork,/srv/api/0.1/tools/i18n/db +SDI,GeoNetwork,/srv/api/0.1/users +SDI,GeoNetwork,/srv/api/0.1/users/353 +SDI,GeoNetwork,/srv/api/0.1/standards/iso19139/codelists/gmd:MD_TopicCategoryCode +SDI,GeoNetwork,/srv/api/groups +SDI,GeoNetwork,/srv/api/me +SDI,GeoNetwork,/srv/en/Spatial%20distribution%20and%20annual%20mean%20catch%20of%20observationsstored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbObstuna/http:/mdst-macroes.ird.fr/documentation/databases/spatial_extent_syc_ll_1999_2015.png%0aSpatial%20distribution%20of%20observations%20stored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/map_mean_annual_catch_cwp55_syc_ll_2010_2015.png +SDI,GeoNetwork,"/srv/en/Spatial%20distribution%20of%20observations%20(period%201999-2015)%20stored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/spatial_extent_syc_ll_1999_2015.png%0aSpatial%20distribution%20and%20annual%20mean%20catch%20(cwp55,%20period%202010-2015)%20for%20observations%20stored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/map_mean_annual_catch_cwp55_syc_ll_2010_2015.png" +SDI,GeoNetwork,/srv/fre/metadata.select +SDI,GeoNetwork,/srv/fre/metadataIdentifierTemplates +SDI,GeoNetwork,/srv/en/Spatial%20distribution%20of%20observations%20stored%20in%20Balbaya%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbBalbaya/thumbnail_balbaya.jpeg +SDI,GeoNetwork,/srv/ita/qi +SDI,GeoNetwork,/srv/en/Spatial%20distribution%20of%20observations%20stored%20in%20FINNS%20ELL%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbObstuna/spatial_extent_syc_ell_1995_2016.png%0aSpatial%20distribution%20of%20observations%20stored%20in%20FINNS%20ELL%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbObstuna/map_mean_annual_catch_cwp11_syc_ell_2010_2016.png%0aSpatial%20distribution%20and%20species%20composition%20of%20observations%20stored%20in%20FINNS%20ELL%20database@http:/mdst-macroes.ird.fr/documentation/databases/map_mean_annual_catch_speciesgroup_cwp11_syc_ell_2010_2016.png%0aSpatial%20distribution%20of%20observations%20and%20mean%20annual%20catch%20stored%20in%20FINNS%20ELL%20database@http:/mdst-macroes.ird.fr/documentation/databases/map_mean_annual_catch_cwp11_syc_ell_2010_2016.png%0aSpatial%20distribution%20of%20observations%20stored%20in%20FINNS%20ELL%20database@http:/mdst-macroes.ird.fr/documentation/databases/spatial_extent_syc_ell_1995_2016.png +SDI,GeoNetwork,/srv/en/xml.harvesting.remove +SDI,GeoNetwork,/srv/en/xml.harvesting.run +SDI,GeoNetwork,/srv/en/xml.harvesting.start +SDI,GeoNetwork,/srv/en/Spatial%20distribution%20of%20observations%20stored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbObstuna/spatial_extent_syc_ell_1995_2016.png%0aSpatial%20distribution%20and%20annual%20mean%20catch%20of%20observationsstored%20in%20FINNS%20LL%20database@http:/mdst-macroes.ird.fr/documentation/databases/dbObstuna/map_mean_annual_catch_cwp11_syc_ell_2010_2016.png +SDI,GeoNetwork,/srv/en/about +SDI,GeoNetwork,/srv/en/admin +SDI,GeoNetwork,/srv/en/csw +SDI,GeoNetwork,/srv/en/csw.config.set +SDI,GeoNetwork,/srv/eng/catalog.signin +SDI,GeoNetwork,/srv/eng/catalog.signin;jsessionid=D8912146C70588E4AA18B235B58B50E6 +SDI,GeoNetwork,/srv/eng/csw +SDI,GeoNetwork,/srv/eng/geoserver.publisher +SDI,GeoNetwork,/srv/eng/home +SDI,GeoNetwork,/srv/eng/indian_ocean_catch_ll_1952_11_01_2016_01_01_tunaatlasIOTC_2017_level0.zip +SDI,GeoNetwork,/srv/eng/iso/iso19139 +SDI,GeoNetwork,/srv/eng/iso19139 +SDI,GeoNetwork,/srv/eng/iso19139.xml +SDI,GeoNetwork,/srv/eng/lang +SDI,GeoNetwork,/srv/eng/lang@json +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=15C6FC18F9DD4F3A0A16F45BBE1B8637 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=1B1A15BE63D7CC906FD652FE933DB8F1 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=28B9321E463235B1B277DF31772E9F03 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=47A52A14912A72745F2527A843C4FEC8 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=519BB835589DF1A792E55CC3368C761E +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=61176F5B13EC5D4152A699EC0AAA10A3 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=87252CC44F3EA084B8FBC11A32505D22 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=BBC42F5507A801F099DC43522EFF6245 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=C59591A5EECC18C820E46F72E5193FE1 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=CCD2B5EB2321255D843FFBA1465D1CCA +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=E494964C245A642B1056C8B14E93440E +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=EC320C938411F22EDB674D2ECC7C1E30 +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=EECCA6BA57FC4CF031693AE579B91AA1 +SDI,GeoNetwork,/srv/fre/translation/db +SDI,GeoNetwork,/srv/eng/service-not-allowed;jsessionid=F9210FB69402360A6CF4E83E82F24681 +SDI,GeoNetwork,/srv/eng/suggest +SDI,GeoNetwork,/srv/eng/thesaurus +SDI,GeoNetwork,/srv/eng/translation/db +SDI,GeoNetwork,/srv/eng/xml.metadata.select +SDI,GeoNetwork,/srv/eng/xml.user.login +SDI,GeoNetwork,/srv/fre/catalog.signin +SDI,GeoNetwork,/srv/fre/datauploads.csv +SDI,GeoNetwork,/srv/fre/geoserver.publisher +SDI,GeoNetwork,/srv/fre/lang +SDI,GeoNetwork,/srv/fre/recordsinternal.csv +SDI,GeoNetwork,/srv/fre/service-not-allowed +SDI,GeoNetwork,/srv/fre/statistics-content +SDI,GeoNetwork,/srv/fre/statistics-content-metadata +SDI,GeoNetwork,/srv/fre/suggest +SDI,GeoNetwork,/srv/fre/thesaurus +SDI,GeoNetwork,/srv/fre/thesaurus.upload +SDI,GeoNetwork,/srv/fre/thesaurus@json +SDI,GeoNetwork,/srv/api/0.1/standards/iso19139/codelists/gmd:MD_TopicCategoryCode +SDI,GeoNetwork,/srv/api/users/1/actions/forget-password +SDI,GeoNetwork,/srv/fre/systeminfo/staging +SDI,GeoNetwork,/srv/en/user.pwupdate +SDI,GeoNetwork,/srv/en/xml.ownership.editors +SDI,GeoNetwork,/srv/fre/admin.ownership.editors +SDI,GeoNetwork,/srv/eng/admin.ownership.editors +SDI,GeoNetwork,/srv/en/metadata.latest.updated +SDI,GeoNetwork,/srv/fre/region.getmap.png +SDI,GeoNetwork,/srv/spa/region.getmap.png \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json new file mode 100644 index 0000000..ea1cda6 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-OTHER.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": "^(?!.*(create|insert|delete|list|get|show|info|search|update|edit)).*$|^(.*(updated|editors|pwupdate|(systeminfo.*)|forget-password|getmap.png|(GetCapabilities.*)|(\/codelists\/.*)))$" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "OTHER" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-create.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-create.csv new file mode 100644 index 0000000..fa665f1 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-create.csv @@ -0,0 +1,8 @@ +SDI,GeoNetwork,/srv/en/metadata.create +SDI,GeoNetwork,/srv/en/metadata.create.form +SDI,GeoNetwork,/srv/fre/md.create +SDI,GeoNetwork,/srv/eng/md.create +SDI,GeoNetwork,/srv/en/metadata.xmlinsert.form +SDI,GeoNetwork,/srv/en/xml.relation.insert +SDI,GeoNetwork,/srv/en/xml.metadata.insert +SDI,GeoNetwork,/srv/eng/xml.metadata.insert diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-create.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-create.json new file mode 100644 index 0000000..e963e82 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-create.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": ".*(\\.create(\\.form){0,1}|\\.insert|\\.xmlinsert\\.form)$" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "create" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.csv new file mode 100644 index 0000000..4663fd1 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.csv @@ -0,0 +1,13 @@ +SDI,GeoNetwork,/srv/en/metadata.massive.delete +SDI,GeoNetwork,/srv/en/xml.metadata.batch.delete +SDI,GeoNetwork,/srv/en/xml.metadata.delete +SDI,GeoNetwork,/srv/en/metadata.delete +SDI,GeoNetwork,/srv/fre/md.delete +SDI,GeoNetwork,/srv/en/metadata.elem.delete +SDI,GeoNetwork,/srv/eng/md.delete +SDI,GeoNetwork,/srv/eng/md.delete.batch +SDI,GeoNetwork,/srv/eng/md.delete@json +SDI,GeoNetwork,/srv/eng/xml.metadata.batch.delete +SDI,GeoNetwork,/srv/eng/xml.metadata.delete +SDI,GeoNetwork,/srv/fre/md.delete.batch +SDI,GeoNetwork,/srv/fre/md.delete@json \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.json new file mode 100644 index 0000000..e555eb7 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-delete.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": ".*(\\.delete(\\.batch|@json|$))" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "delete" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-list.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-list.csv new file mode 100644 index 0000000..04e2ac4 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-list.csv @@ -0,0 +1,38 @@ +SDI,GeoNetwork,/srv/fre/admin.group.list@json +SDI,GeoNetwork,/srv/en/user.list +SDI,GeoNetwork,/srv/fre/admin.config.list +SDI,GeoNetwork,/srv/eng/admin.logfile.list +SDI,GeoNetwork,/srv/eng/admin.group.list +SDI,GeoNetwork,/srv/en/xml.usergroups.list +SDI,GeoNetwork,/srv/eng/admin.usergroups.list +SDI,GeoNetwork,/srv/fre/admin.group.list +SDI,GeoNetwork,/srv/fre/admin.logfile.list +SDI,GeoNetwork,/srv/fre/admin.logo.list +SDI,GeoNetwork,/srv/fre/admin.schema.list +SDI,GeoNetwork,/srv/eng/md.formatter.list +SDI,GeoNetwork,/srv/fre/admin.schema.list@json +SDI,GeoNetwork,/srv/fre/admin.user.list +SDI,GeoNetwork,/srv/fre/admin.usergroups.list +SDI,GeoNetwork,/srv/en/xml.user.list +SDI,GeoNetwork,/srv/eng/regions.category.list +SDI,GeoNetwork,/srv/eng/regions.category.list@json +SDI,GeoNetwork,/srv/eng/admin.config.list +SDI,GeoNetwork,/srv/eng/regions.list +SDI,GeoNetwork,/srv/eng/admin.config.virtualcsw.list +SDI,GeoNetwork,/srv/en/group.list +SDI,GeoNetwork,/srv/eng/admin.logo.list +SDI,GeoNetwork,/srv/fre/admin.config.virtualcsw.list +SDI,GeoNetwork,/srv/eng/admin.schema.list +SDI,GeoNetwork,/srv/eng/admin.schema.list@json +SDI,GeoNetwork,/srv/eng/admin.user.list +SDI,GeoNetwork,/srv/fre/md.formatter.list +SDI,GeoNetwork,/srv/en/metadata.templates.list +SDI,GeoNetwork,/srv/eng/xml.usergroups.list +SDI,GeoNetwork,/srv/eng/admin.harvester.list +SDI,GeoNetwork,/srv/en/xml.group.list +SDI,GeoNetwork,/srv/en/category.list +SDI,GeoNetwork,/srv/eng/xml.group.list +SDI,GeoNetwork,/srv/fre/regions.category.list +SDI,GeoNetwork,/srv/fre/regions.category.list@json +SDI,GeoNetwork,/srv/fre/regions.list +SDI,GeoNetwork,/srv/fre/regions.list@json diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-login.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-list.json similarity index 68% rename from src/test/resources/rules/GeoNetwork/GeoNetwork-login.json rename to src/test/resources/rules/GeoNetwork/GeoNetwork-list.json index 5ac08cd..6819ebb 100644 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-login.json +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-list.json @@ -2,11 +2,11 @@ "match": { "serviceClassRegex": "SDI", "serviceNameRegex": "GeoNetwork", - "calledMethodRegex": "\/login\\.jsp.*" + "calledMethodRegex": ".*(\\.list(@json|$))" }, "replace": { "serviceClass": "SDI", "serviceName": "GeoNetwork", - "calledMethod": "login" + "calledMethod": "list" } } \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-login.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-login.csv deleted file mode 100644 index f8e7f4e..0000000 --- a/src/test/resources/rules/GeoNetwork/GeoNetwork-login.csv +++ /dev/null @@ -1,22 +0,0 @@ -SDI,GeoNetwork,/login.jsp -SDI,GeoNetwork,/login.jsp;jsessionid=026438CEE6D095C440E30AA2BE5F1C52 -SDI,GeoNetwork,/login.jsp;jsessionid=071014EEDB6B2BC471117DDE9DBAB4AF -SDI,GeoNetwork,/login.jsp;jsessionid=1AA1F8CF444ACF53A7ED35545739182B -SDI,GeoNetwork,/login.jsp;jsessionid=3A65F66FF8562EEB67A950B0E34B210D -SDI,GeoNetwork,/login.jsp;jsessionid=3FE0648A84FFE76EDF27E3ABA1F38FE0 -SDI,GeoNetwork,/login.jsp;jsessionid=40DAC33C14635BC810F8D849D245CF64 -SDI,GeoNetwork,/login.jsp;jsessionid=45C2F7FBBD72D44E1B41124FF2ECC4FB -SDI,GeoNetwork,/login.jsp;jsessionid=5502E052F453E2B5635B0AAB1FE2F58C -SDI,GeoNetwork,/login.jsp;jsessionid=5F2723D37357C263AA231D6400370DA6 -SDI,GeoNetwork,/login.jsp;jsessionid=5F54FEA2C8F69CFFB1C71F9C2B338025 -SDI,GeoNetwork,/login.jsp;jsessionid=9A9062700CB06003619AEEF2D636A8E9 -SDI,GeoNetwork,/login.jsp;jsessionid=9D78B2D26010B4BD674AB859CD6A6EB0 -SDI,GeoNetwork,/login.jsp;jsessionid=9DB16E206EBBEDB8DB5DE7076FDB45DD -SDI,GeoNetwork,/login.jsp;jsessionid=AD1D6B3B90A448CC87E32EEEA7D1877B -SDI,GeoNetwork,/login.jsp;jsessionid=D8912146C70588E4AA18B235B58B50E6 -SDI,GeoNetwork,/login.jsp;jsessionid=E3A90B917D7C8B71D386F6B6834D7486 -SDI,GeoNetwork,/login.jsp;jsessionid=F0DCF3AD6DCEF95EBCB6C20C2FDD6146 -SDI,GeoNetwork,/login.jsp;jsessionid=F162A6D953B374097AEC9E0A9201BD1A -SDI,GeoNetwork,/login.jsp;jsessionid=F19134D6E23F6DD6C8F6CB7536052EC2 -SDI,GeoNetwork,/login.jsp;jsessionid=F25F1AA1630EA3E955F3CEFEE3732853 -SDI,GeoNetwork,/login.jsp;jsessionid=101C308122D54162E5974173C3AC9470 diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-read.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-read.csv new file mode 100644 index 0000000..65815c2 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-read.csv @@ -0,0 +1,41 @@ +SDI,GeoNetwork,/srv/en/csw.config.get +SDI,GeoNetwork,/srv/eng/geonetwork/srv/en/xml.metadata.get +SDI,GeoNetwork,/srv/eng/xml.metadata.get +SDI,GeoNetwork,/srv/eng/xml.metadata.get/global_nominal_catch_tunaatlasIRD_level0_data_structure_definition +SDI,GeoNetwork,/srv/fre/resources.get +SDI,GeoNetwork,/srv/fre/xml.metadata.get +SDI,GeoNetwork,/srv/en/xml.config.get +SDI,GeoNetwork,/srv/en/metadata.xml.get +SDI,GeoNetwork,/srv/en/metadata.get +SDI,GeoNetwork,/srv/en/xml.meatadata.get +SDI,GeoNetwork,/srv/en/xml.region.get +SDI,GeoNetwork,/srv/en/xml.harvesting.get +SDI,GeoNetwork,/srv/en/group.get +SDI,GeoNetwork,/srv/eng/admin.group.get +SDI,GeoNetwork,/srv/en/metadata.get.xml +SDI,GeoNetwork,/srv/en/resources.get +SDI,GeoNetwork,/srv/fre/admin.group.get +SDI,GeoNetwork,/srv/en/user.get +SDI,GeoNetwork,/srv/en/xml.metadata.get +SDI,GeoNetwork,/srv/eng/resources.get +SDI,GeoNetwork,/srv/en/csw/metadata.show +SDI,GeoNetwork,/srv/en/metadata.show +SDI,GeoNetwork,/srv/en/metadata.show.embedded +SDI,GeoNetwork,/pdf/info.json +SDI,GeoNetwork,/srv/fre/admin.harvester.info +SDI,GeoNetwork,/srv/ita/info +SDI,GeoNetwork,/srv/spa/info +SDI,GeoNetwork,/srv/eng/admin.harvester.info +SDI,GeoNetwork,/srv/en/xml.info +SDI,GeoNetwork,/srv/en/xml.schema.info +SDI,GeoNetwork,/srv/fre/md.element.info +SDI,GeoNetwork,/srv/en/xml.harvesting.info +SDI,GeoNetwork,/srv/eng/info +SDI,GeoNetwork,/srv/eng/md.element.info +SDI,GeoNetwork,/srv/eng/xml.config.info +SDI,GeoNetwork,/srv/eng/xml.info +SDI,GeoNetwork,/srv/eng/xml.schema.info +SDI,GeoNetwork,/srv/fre/info +SDI,GeoNetwork,/srv/fre/info@json +SDI,GeoNetwork,/srv/fre/xml.config.info +SDI,GeoNetwork,/srv/fre/xml.config.info@json \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-read.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-read.json new file mode 100644 index 0000000..59baf53 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-read.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": ".*(\\.get(\\..*|\/.*|$)|\\.show(\\..*|$)|((\\.|/)info(\\..*|\\.*|@json|$)))" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "read" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-search.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-search.csv new file mode 100644 index 0000000..4b70a01 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-search.csv @@ -0,0 +1,45 @@ +SDI,GeoNetwork,/srv/en/portal.opensearch +SDI,GeoNetwork,/srv/eng/portal.opensearch +SDI,GeoNetwork,/srv/en/main.search.embedded +SDI,GeoNetwork,/srv/eng/catalog.search +SDI,GeoNetwork,/srv/fre/catalog.search +SDI,GeoNetwork,/srv/fre/catalog.search.nojs +SDI,GeoNetwork,/srv/en/xml.search +SDI,GeoNetwork,/srv/eng/search +SDI,GeoNetwork,/srv/eng/search/facet/config +SDI,GeoNetwork,/srv/ita/catalog.search +SDI,GeoNetwork,/srv/spa/catalog.search +SDI,GeoNetwork,/srv/en/main.search +SDI,GeoNetwork,/srv/spa/search/facet/config +SDI,GeoNetwork,/srv/en/metadata.searchunused +SDI,GeoNetwork,/srv/en/portal.opensearch +SDI,GeoNetwork,/srv/eng/portal.opensearch +SDI,GeoNetwork,/srv/en/main.search.embedded +SDI,GeoNetwork,/srv/eng/catalog.search +SDI,GeoNetwork,/srv/fre/catalog.search +SDI,GeoNetwork,/srv/fre/catalog.search.nojs +SDI,GeoNetwork,/srv/en/xml.search +SDI,GeoNetwork,/srv/eng/search +SDI,GeoNetwork,/srv/eng/search/facet/config +SDI,GeoNetwork,/srv/ita/catalog.search +SDI,GeoNetwork,/srv/spa/catalog.search +SDI,GeoNetwork,/srv/en/main.search +SDI,GeoNetwork,/srv/spa/search/facet/config +SDI,GeoNetwork,/srv/en/metadata.searchunused +SDI,GeoNetwork,/srv/en/metadata.searchunused.form +SDI,GeoNetwork,/srv/ita/search/facet/config +SDI,GeoNetwork,/srv/en/catalog.search +SDI,GeoNetwork,/srv/eng/csw/api/3/action/package_search +SDI,GeoNetwork,/srv/eng/catalog.search;jsessionid=76BF882719B821A037DEA61ECEC12FF4 +SDI,GeoNetwork,/srv/eng/catalog.search;jsessionid=AA535BD8A3DC1CB50D27741607427213 +SDI,GeoNetwork,/srv/fre/statistics-search-by-service-type +SDI,GeoNetwork,/srv/eng/xml.search +SDI,GeoNetwork,/srv/fre/catalog.search;jsessionid=0B5CC2B8BB3C56466F1DF83AB7A5AEE3 +SDI,GeoNetwork,/srv/fre/catalog.search;jsessionid=B800D662C12C360062A1ED146AFA0A38 +SDI,GeoNetwork,/srv/fre/rss.search +SDI,GeoNetwork,/srv/fre/search/facet/config +SDI,GeoNetwork,/srv/fre/statistics-search +SDI,GeoNetwork,/srv/fre/statistics-search-by-date +SDI,GeoNetwork,/srv/fre/statistics-search-fields +SDI,GeoNetwork,/srv/fre/statistics-search-ip +SDI,GeoNetwork,/srv/fre/statistics-search-terms diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-search.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-search.json new file mode 100644 index 0000000..454070c --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-search.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": ".*(\\.|-|/|package_|open)search(\/.*|unused(.form){0,1}|\\..*|;jsessionid=.*|-.*|$)" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "search" + } +} \ No newline at end of file diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv new file mode 100644 index 0000000..dc21f24 --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.csv @@ -0,0 +1,28 @@ +SDI,GeoNetwork,/srv/eng/group.update +SDI,GeoNetwork,/srv/fre/md.privileges.update +SDI,GeoNetwork,/srv/en/metadata.update.finish +SDI,GeoNetwork,/srv/fre/admin.logo.update +SDI,GeoNetwork,/srv/en/user.update +SDI,GeoNetwork,/srv/eng/admin.group.update +SDI,GeoNetwork,/srv/en/metadata.update +SDI,GeoNetwork,/srv/eng/admin.user.update +SDI,GeoNetwork,/srv/eng/md.privileges.update +SDI,GeoNetwork,/srv/en/xml.harvesting.update +SDI,GeoNetwork,/srv/eng/metadata.update.finish +SDI,GeoNetwork,/srv/en/group.update +SDI,GeoNetwork,/srv/fre/metadata.edit! +SDI,GeoNetwork,/srv/en/user.infoedit +SDI,GeoNetwork,/srv/en/user.pwedit +SDI,GeoNetwork,/srv/eng/metadata.edit +SDI,GeoNetwork,/srv/fre/catalog.edit +SDI,GeoNetwork,/srv/eng/catalog.edit +SDI,GeoNetwork,/srv/en/user.edit +SDI,GeoNetwork,/srv/en/xml.metadata.edit +SDI,GeoNetwork,/srv/eng/metadata.edit! +SDI,GeoNetwork,/srv/fre/md.edit.save +SDI,GeoNetwork,/srv/fre/md.edit.saveonly +SDI,GeoNetwork,/srv/en/metadata.edit +SDI,GeoNetwork,/srv/en/metadata.edit! +SDI,GeoNetwork,/srv/eng/md.edit +SDI,GeoNetwork,/srv/eng/md.edit.commit +SDI,GeoNetwork,/srv/fre/md.edit diff --git a/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json new file mode 100644 index 0000000..e191fae --- /dev/null +++ b/src/test/resources/rules/GeoNetwork/GeoNetwork-update.json @@ -0,0 +1,12 @@ +{ + "match": { + "serviceClassRegex": "SDI", + "serviceNameRegex": "GeoNetwork", + "calledMethodRegex": ".*(\\.update($|\\.finish)|\\.edit(!{0,1}|\\.save(only){0,1}|\\.commit)$|\\.infoedit$|\\.pwedit$)" + }, + "replace": { + "serviceClass": "SDI", + "serviceName": "GeoNetwork", + "calledMethod": "update" + } +} \ No newline at end of file