Commit Graph

687 Commits

Author SHA1 Message Date
Luca Frosini dd88daecab Fixed AddToContext 2021-09-16 17:23:13 +02:00
Luca Frosini f17106e42e Add to context add only the ERElement in the source context #12218 2021-09-16 15:23:04 +02:00
Luca Frosini 78d1f71aa6 Add To Context adds only the ERElement in the source context #12218 2021-09-15 16:22:48 +02:00
Luca Frosini a1fbd07378 Fixed test 2021-09-14 16:34:40 +02:00
Luca Frosini 85c773fb1b Relation instances request returns relations and not Resources 2021-09-14 15:58:00 +02:00
Luca Frosini 113c3ceb9e Not including source in consistsOf when serialising Resource #22001 2021-09-13 16:48:29 +02:00
Luca Frosini 93855856b7 Header contains context property only when requested 2021-09-02 15:06:40 +02:00
Luca Frosini fa47217afd improved bug fix 2021-08-05 19:44:11 +02:00
Luca Frosini 0760bd29d6 Fixed null pointer exception 2021-08-05 16:41:29 +02:00
Luca Frosini 391ecce152 Fixing tests 2021-08-04 17:31:25 +02:00
Luca Frosini f44b07f9b7 Commented tests checks which causes infinite recursion 2021-08-04 16:34:06 +02:00
Luca Frosini 17096d0b4c fixed test 2021-08-04 15:41:51 +02:00
Luca Frosini e3aa414108 Fxied tests according to the fixed gcube model 2021-08-04 15:10:09 +02:00
Luca Frosini 7bb49b1f4c added test 2021-08-04 14:12:24 +02:00
Luca Frosini 5b97c45a4c Fixed error message on exception 2021-07-07 19:15:13 +02:00
Luca Frosini 4ec7d40f7b Fixed prepared query 2021-07-07 17:36:10 +02:00
Luca Frosini 6770823e29 Removed OLD query parameter in prepared query API 2021-07-07 12:01:47 +02:00
Luca Frosini 67eb336c96 Added a _ prefix for query parameters to avoid constraint clashes 2021-07-07 11:24:47 +02:00
Luca Frosini 257072898a Fixed sharing REST path 2021-07-01 12:13:23 +02:00
Luca Frosini 1924cef56d Fixed inclusion of contexts in instaces 2021-07-01 12:13:11 +02:00
Luca Frosini d5189d4397 Renamed class 2021-06-25 12:25:06 +02:00
Luca Frosini acf64b8acc Fixed javadoc 2021-06-24 12:27:41 +02:00
Luca Frosini ce3d021845 Instances test clean the environment before and after each test 2021-03-09 12:58:46 +01:00
Luca Frosini abd1584901 Fixed RemoveFromContext operation and forced ConsistsOf RemoveConstraint 2021-03-09 12:46:56 +01:00
Luca Frosini d68c3ba564 Fixing remove from context 2021-03-09 12:26:49 +01:00
Luca Frosini 43fdf5e237 Adding tests and assertion 2021-03-09 09:51:32 +01:00
Luca Frosini aa093f8e73 Improving test 2021-03-08 21:23:51 +01:00
Luca Frosini 4047e587da Improving tests 2021-03-08 20:52:12 +01:00
Luca Frosini 945a58a3fc Fixing test 2021-03-08 17:10:39 +01:00
Luca Frosini 71ad45f72b Cleaning the env before launching the test 2021-03-08 17:08:39 +01:00
Luca Frosini f80eec0301 Fixing tests 2021-03-08 17:05:56 +01:00
Luca Frosini df3d81d2bd Fixing tests 2021-03-08 16:56:35 +01:00
Luca Frosini cdd6c121e1 Restored code to be used later on 2021-03-08 14:57:16 +01:00
Luca Frosini f29d362d75 Improving tests 2021-03-08 14:56:09 +01:00
Luca Frosini b37cbb0020 Improving tests 2021-03-08 13:09:18 +01:00
Luca Frosini 8cec58eae8 Improved Tests 2021-03-08 12:27:59 +01:00
Luca Frosini c1f0a03de4 improving tests 2021-03-08 11:20:18 +01:00
Luca Frosini f760231d6b Aligned Header properties 2021-03-08 11:18:53 +01:00
Luca Frosini b19539f9e5 Improving check in tests 2021-03-08 11:02:42 +01:00
Luca Frosini d0fe1fc2ec Reorganizing tests 2021-03-08 09:56:23 +01:00
Luca Frosini 5fc6288a65 Removed ununsed class 2021-03-08 09:39:25 +01:00
Luca Frosini 5801089325 Reorganizing tests 2021-03-08 09:38:37 +01:00
Luca Frosini 23d0486f64 Fixing tests 2021-03-08 09:35:58 +01:00
Luca Frosini 3a6f3cc59b Using the proper exception 2021-03-08 09:08:25 +01:00
Luca Frosini 5db160a2dc IMproved affected instances management 2021-03-06 10:53:45 +01:00
Luca Frosini 56265d35bc Fixing tests 2021-03-05 18:21:25 +01:00
Luca Frosini d7ed728c81 Fixing corner case 2021-03-05 18:14:07 +01:00
Luca Frosini 6afde17b0f Fixing corner cases 2021-03-05 17:22:01 +01:00
Luca Frosini ada9439ab9 DryRun has been implemented as transaction rollback 2021-03-05 16:19:55 +01:00
Luca Frosini e5eedc0108 Fixing code 2021-03-05 16:00:59 +01:00
Luca Frosini 5d2532dfac Fixed bug 2021-03-05 15:44:04 +01:00
Luca Frosini 00a3efb1f6 Fixed bug 2021-03-05 15:26:19 +01:00
Luca Frosini e148a0b253 Harmonizing APIs 2021-03-05 15:14:51 +01:00
Luca Frosini 6b999a54ef Solved rawtypes and Removed some @SuppressWarnings("rawtypes") 2021-03-05 15:04:27 +01:00
Luca Frosini 05a8825635 Reorganizing code 2021-03-05 14:41:02 +01:00
Luca Frosini 93f5999553 Added affected instances variable to ElementManagement 2021-03-05 11:59:24 +01:00
Luca Frosini 9770531b33 Reorganizing code 2021-03-05 10:46:59 +01:00
Luca Frosini 5a94aadce5 Implemented strategy to properly check resource sanity in case a delete
has been requested for a ConsistsOf or a Facet.
2021-03-04 21:57:01 +01:00
Luca Frosini 42bb1a217a improving code 2021-03-04 17:08:54 +01:00
Luca Frosini dc481fbba6 Reorganizing code 2021-03-04 11:45:27 +01:00
Luca Frosini 35be405f8e Set uuid on Management instance to avoid null in logs during tests 2021-03-04 10:39:18 +01:00
Luca Frosini 005d9a2427 Changed sanityCheck strategy 2021-03-04 10:24:21 +01:00
Luca Frosini 88baf3cb90 Fixing bug and added tests 2021-03-03 17:18:36 +01:00
Luca Frosini ec9b6665ca Improving tests 2021-03-02 16:55:42 +01:00
Luca Frosini 25f2850114 Fixed bug 2021-03-02 16:39:30 +01:00
Luca Frosini a684479858 Fixing and improving tests 2021-03-02 16:39:21 +01:00
Luca Frosini 951aa750e1 Improved error message 2021-03-02 16:19:29 +01:00
Luca Frosini eb0a6f213d Removed old commented method 2021-03-02 11:55:16 +01:00
Luca Frosini df5e44e520 Denying the possibility to create a stand alone Facet 2021-03-02 11:54:59 +01:00
Luca Frosini 647e772827 Removed old commented code of sanityCheck 2021-03-02 10:59:44 +01:00
Luca Frosini 94388d9a36 SanityCheck on Resource for non safe operation made on Facet/IsRealtedTo 2021-03-02 10:58:23 +01:00
Luca Frosini f36ff52dcf Added Operation enum to be able to check which action has been executed 2021-03-02 10:25:58 +01:00
Luca Frosini 0a807d74a2 Improving code 2021-03-02 09:35:02 +01:00
Luca Frosini c65e84a0bb Removed old commented code 2021-03-02 09:21:10 +01:00
Luca Frosini 12ade8e7de Removed old commented code to set the calledMethod 2021-03-02 09:13:53 +01:00
Luca Frosini 703a5f3b22 Merge remote-tracking branch 'origin/feature/20316' into feature/20316 2021-03-01 17:09:26 +01:00
Luca Frosini a6a45d50e2 The target context is now a class variable 2021-03-01 17:09:09 +01:00
Luca Frosini 9cf40bf2fa Going to improve sanity check to manage the
addToContext/removeFromContext actions
2021-03-01 16:42:34 +01:00
Luca Frosini 99e88fc1e3 Cleaning code 2021-02-26 18:46:00 +01:00
Luca Frosini b3433d2d23 Cleaning code 2021-02-26 18:41:55 +01:00
Luca Frosini 6d3d9b8e37 Cleaning code 2021-02-26 18:41:14 +01:00
Luca Frosini 5f8850611d Cleaning code 2021-02-26 18:39:53 +01:00
Luca Frosini cc908bf1b0 Cleaning code 2021-02-26 18:37:57 +01:00
Luca Frosini 9deed7214b fixed log 2021-02-26 18:11:35 +01:00
Luca Frosini 129c4b5b54 Getting constant from ORientDB class in place of redefining it 2021-02-26 18:08:13 +01:00
Luca Frosini 83ca22a15e Instances are now validate with the defined schema #18216 and #7355 2021-02-23 17:31:46 +01:00
Luca Frosini 151ad9add4 Improving code 2021-02-23 14:44:37 +01:00
Luca Frosini d58dcc20cf Fixed bug and tests 2021-02-23 12:27:42 +01:00
Luca Frosini 2485f43510 Fixing test 2021-02-23 11:51:37 +01:00
Luca Frosini 985d37a077 Fixing test 2021-02-23 11:44:09 +01:00
Luca Frosini c443ae8c4e Fixing test 2021-02-23 11:40:44 +01:00
Luca Frosini 132f9c51c6 fixing test 2021-02-23 11:38:35 +01:00
Luca Frosini 02c924d111 Fixed generic 2021-02-23 11:36:00 +01:00
Luca Frosini 3756439c72 Fixed tests to comply with new validation made by the service 2021-02-23 11:33:57 +01:00
Luca Frosini 30be493f4a Refactorign code 2021-02-22 16:36:19 +01:00
Luca Frosini 03271c0e41 Validating instances 2021-02-22 12:38:12 +01:00
Luca Frosini b276fecdc8 Added facet schema validation 2021-02-22 11:19:11 +01:00
Luca Frosini f767fc021a Moved sanityCheck in internalCreate() and internalUpdate() functions 2021-02-22 11:15:15 +01:00
Luca Frosini 8822d1a40b Moved a link a in tests placeholder strings from http to https #20783 2021-02-22 09:46:00 +01:00
Luca Frosini d98303c28d Fixing code 2021-02-19 19:38:10 +01:00
Luca Frosini 44631557da Improving code 2021-02-19 19:32:23 +01:00
Luca Frosini a0ffe74776 Fixing tests 2021-02-19 16:08:57 +01:00
Luca Frosini b7a2e6c6eb Fixed bugs 2021-02-19 15:31:26 +01:00
Luca Frosini 799aa5a770 Improving code 2021-02-19 14:34:48 +01:00
Luca Frosini de12ce5a6d Implementing sanityCheck 2021-02-18 18:22:39 +01:00
Luca Frosini ad1637ab14 renamed variable 2021-02-18 09:42:51 +01:00
Luca Frosini dbbdd206d5 Fixed test conrner case 2021-02-17 15:52:09 +01:00
Luca Frosini a553b9cd8d Reorganizing tests 2021-02-17 15:51:25 +01:00
Luca Frosini 2597379ad4 Fixing serilization 2021-02-17 15:16:25 +01:00
Luca Frosini 74be68d2b6 Revisited serilization 2021-02-17 11:29:43 +01:00
Luca Frosini 845ddde2c8 Rivisiting element serilization 2021-02-16 18:43:47 +01:00
Luca Frosini fe37358ea7 Adding SchemaViolationException 2021-02-16 17:17:40 +01:00
Luca Frosini e653081e55 Fixed typo. Tests runs successfully 2021-02-16 13:52:23 +01:00
Luca Frosini a96cd187a2 Fixed bugs introduced with refactoring 2021-02-12 17:06:12 +01:00
Luca Frosini 319fa760e3 Fixing code due to refactoring 2021-02-12 12:09:33 +01:00
Luca Frosini a518f98235 Refactoring code to simplify type management and to have a better
support for types cache.
2021-02-11 14:35:54 +01:00
Luca Frosini b98af42e99 Reorganizing code 2021-02-10 15:54:52 +01:00
Luca Frosini 421dce843f Adding type cache. Refatoring code 2021-02-10 15:45:48 +01:00
Luca Frosini c21fa2aa1a Refactoring code 2021-02-08 16:26:58 +01:00
Luca Frosini 3434f373f6 Refactoring service 2021-02-05 17:50:16 +01:00
Luca Frosini f722c2b148 Implementing add/remove to/from context no follow #20531 2021-02-04 14:05:52 +01:00
Luca Frosini dd2e363a51 Implementing strategy for add/remove to/from context no follow 2021-02-02 17:11:13 +01:00
Luca Frosini d4f4ac9468 Implementing strategy for add/remove to/from context no follow 2021-02-02 16:51:40 +01:00
Luca Frosini b18ebe7427 Implementing strategy for add/remove to/from context no follow 2021-02-02 16:50:48 +01:00
Luca Frosini 6082e3a0d6 Fixed tests 2021-01-29 17:29:49 +01:00
Luca Frosini 55b79bc835 Superclasses are now filtered (i.e. internal types are not added to the
list)and ordered (first the immediate superclass and the last the basic
type e.g. Resource, Facet, IsRelatedTo, ConsistsOf) #20319
2021-01-29 16:13:33 +01:00
Luca Frosini 58d7aa93c3 Implemented #20555 #20530 2021-01-28 22:53:10 +01:00
Luca Frosini 27cec7ec31 Add to Context deny to add a resource without adding at least a facet.
Added a test to check the service behave properly
2021-01-27 21:57:06 +01:00
Luca Frosini 376fbd1df6 Improved tests and assertion 2021-01-26 17:35:08 +01:00
Luca Frosini 406035dd40 Impl. Add/Remove to/from Context not following PropagationConstraints 2021-01-26 17:04:00 +01:00
Luca Frosini ab1f81fce7 Revert "Revert "Added dryRun""
This reverts commit 3585ccc197.
2021-01-26 16:54:20 +01:00
Luca Frosini 3585ccc197 Revert "Added dryRun"
This reverts commit afbc42eb8b.
2021-01-26 16:53:26 +01:00
Luca Frosini afbc42eb8b Added dryRun 2021-01-26 16:52:02 +01:00
Luca Frosini a10323735d Implementing #20530 #20531 2021-01-25 17:38:19 +01:00
Luca Frosini 60c96b6a91 Reorganizing REST interface 2021-01-24 23:33:06 +01:00
Luca Frosini ab8b77ba65 Added hidden test 2021-01-21 14:44:35 +01:00
Luca Frosini 342d89185c Added fixed authorship 2021-01-20 17:08:59 +01:00
Luca Frosini 73e1fee53b Fixed code 2021-01-20 17:04:29 +01:00
Luca Frosini 1ccefd44e2 Ported SchemaManagement to the new way to define the type of a property 2021-01-20 15:11:51 +01:00
Luca Frosini bf24fe07c4 Fixing type management 2021-01-19 17:21:51 +01:00
Luca Frosini 0efb8f5e08 Added assertion in junit test to properly test type update 2021-01-15 16:09:07 +01:00
Luca Frosini c1f694a9e2 Fixed type update 2021-01-14 18:26:26 +01:00
Luca Frosini 11bf7f0638 Renamed class toalign the naming to the others 2021-01-13 21:55:01 +01:00
Luca Frosini fe96b0811f Changed PROPAGATION_CONSTRAINT in PROPAGATION_CONSTRAINT_PROPERTY due to
change in IS Model
2021-01-13 21:53:51 +01:00
Luca Frosini 0606d291a4 Implementing update. Removed uneeded interface 2021-01-13 21:52:09 +01:00
Luca Frosini c0fb892279 Implementing type update 2021-01-12 15:41:19 +01:00
Luca Frosini e51c635dea Added Test 2021-01-10 23:42:11 +01:00
Luca Frosini e89481a5f1 Fixed tests due to changes in the model 2020-12-23 10:55:16 +01:00
Luca Frosini e635cf1a6d added intermediate variable to improve debugging 2020-12-22 16:34:50 +01:00
Luca Frosini 18a552a3b7 Merge remote-tracking branch 'origin/feature/20367' into feature/20298 2020-12-22 11:38:31 +01:00
Luca Frosini 1a82b13878 extracted function to get the proper type management class 2020-12-22 11:37:36 +01:00
Luca Frosini 10e5538c6d Fixed tests to comply with fixed model 2020-12-21 23:09:57 +01:00
Luca Frosini 648abc52c3 Implementing type update 2020-12-14 12:36:53 +01:00
Luca Frosini 679c0a7910 Creating update method ofr type 2020-12-14 12:34:21 +01:00
Luca Frosini 7327f61370 Added test for prepared query 2020-12-10 18:16:28 +01:00
Luca Frosini daa7959a7e Fixing prepared query 2020-12-10 11:13:14 +01:00
Luca Frosini 64b0c49771 Fixed URL path 2020-11-24 15:39:09 +01:00
Luca Frosini 251d239773 Fixed access method 2020-11-12 12:35:31 +01:00
Luca Frosini 9c8633d8e1 Aligned code with the same APIs exposed in ACCESS port type 2020-11-11 14:17:28 +01:00
Luca Frosini 2ce233c694 Added getInstanceContexts() in ACCESS port type 2020-11-11 14:17:03 +01:00
Luca Frosini 18cd7e167e Including contexts in the instances header when requested #20012 2020-11-09 15:45:07 +01:00
Luca Frosini 1646cbe8de Fixed test 2020-11-05 17:03:05 +01:00
Luca Frosini a92f5c532c Improved test 2020-11-05 15:58:30 +01:00
Luca Frosini fd32391267 Added Context Cache 2020-11-05 12:12:19 +01:00
Luca Frosini f4fb2102d7 Added API to get the list of contexts for an instance 2020-11-03 16:30:24 +01:00
Luca Frosini f8ec6b9084 Fixed path parameters on AddToContext and RemoveFromContexts 2020-10-30 21:10:37 +01:00
Luca Frosini 6793b16856 Added support to perform hierarchical mode requests 2020-10-27 15:46:46 +01:00
Luca Frosini a19c3dbf87 Added full support for hierarchical mode 2020-10-27 15:36:28 +01:00
Luca Frosini a7c89cded0 Fixed name 2020-10-27 15:12:11 +01:00
Luca Frosini cb84f7aa29 Fixed test 2020-10-14 14:54:01 +02:00
lucafrosini b18ea8efdb Removed unused import 2020-10-07 16:25:19 +02:00
Luca Frosini ec73e33c5a Added suppress warning annotation 2020-07-07 17:16:30 +02:00
Luca Frosini 1e47580d39 Switching to gcube-jackson 2020-07-07 17:15:22 +02:00
Luca Frosini e5520c06c3 Improved ignore file 2020-05-14 18:25:44 +02:00
Luca Frosini 5d17c53dae Fixed commented test 2020-05-14 18:25:13 +02:00
Luca Frosini bee0017d58 Commented test 2020-05-14 18:24:14 +02:00
Luca Frosini c93cd35172 Fixed code to generate DB Key 2020-05-08 12:41:58 +02:00
Luca Frosini 35e9883a38 Added ServletContextListener to intercept start and stop of the service 2020-03-17 17:22:03 +01:00
Luca Frosini 64177d1c85 Changed the way to account requests.
The accounted called Methods are summarized in file ISMethods.txt in
src/test/resources
2020-03-16 14:51:13 +01:00
Luca Frosini f3b3c038db Fixed calledMethod set 2020-03-12 19:22:27 +01:00
Luca Frosini 1488506060 Fixed catch to properly propagate exception 2020-02-05 16:22:33 +01:00
Luca Frosini 3bbcccca79 Fixed thrown exception in case the type does not exists to return a 404
Not Found HTTP error to client
2020-02-05 16:16:21 +01:00
Luca Frosini 8413b94a86 Changed DataTime Pattern import due to changes in IS Model 2020-02-04 09:44:38 +01:00
Luca Frosini aa72d03b4f TypeBinder has been renamed to TypeMapper 2020-02-04 09:30:50 +01:00
Luca Frosini 69647bbc32 Fixed code 2020-02-03 11:22:12 +01:00
Luca Frosini ede8f1be76 Fixed imports and class name due to IS Model refactoring 2020-02-03 10:52:09 +01:00
Luca Frosini aaaa3915fe Renaming classes to align the name with the IS model reorganization 2020-01-30 11:53:15 +01:00
Luca Frosini 241b6269bc Reorganized model as following
Element
 - EntityElement
   - Entity
     - Resource
     - Facet
   - Context
   - EntityType
     - ResourceType (3 lists of PropertyDefinition, LinkedFacet,
LinkedResource)
     - FacetType (1 list of PropertyDefinition)
 - RelationElement
   - Relation
     - IsRelatedTo
     - ConsistsOf
   - IsParentOf
   - RelationType
     - IsRelatedTo (1 list of PropertyDefinition)
     - ConsistsOf (1 list of PropertyDefinition)
 - PropertyElement
   - Property
     - Header
     - PropagationConstraint
     - Encrypted
   - PropertyType (1 list of PropertyDefinition)
     - PropertyDefinition
     - LinkedEntity
       - LinkedFacet
       - LinkedResource
2020-01-30 11:04:16 +01:00
Luca Frosini 58488f743e fixed test compiling 2020-01-29 16:33:18 +01:00
Luca Frosini 1e02edd42c Used switch case in place of if else if 2020-01-28 10:09:58 +01:00
Luca Frosini d780357089 Fixed bug which does not allow to create PropertyTypeDefiniton of
Property during DB initialization
2020-01-27 17:57:24 +01:00
Luca Frosini d5c2ecd896 Reorganizing packages 2020-01-27 17:07:37 +01:00
Luca Frosini eb99996c62 Reorganized Packages 2020-01-27 17:04:45 +01:00
Luca Frosini 96439e829e Splitted test 2020-01-24 16:54:44 +01:00
Luca Frosini 5d9da98508 Fixed Schema management and test 2020-01-24 11:25:13 +01:00
Luca Frosini ecc047889e Fixed types creations 2020-01-23 17:15:02 +01:00
Luca Frosini a825fe51af Fixed types creation to support resource schema definition. 2020-01-20 10:29:56 +01:00
Luca Frosini 72f2ee3e15 Removed restriction annotation which is not needed with open JDK 2019-12-13 10:19:52 +01:00
Luca Frosini 63700398d4 removed empty javadoc 2019-12-05 17:03:59 +01:00
Luca Frosini 9b3b2e2a95 Commmented test 2019-12-05 17:01:35 +01:00