Commit Graph

116 Commits

Author SHA1 Message Date
Manuele Simi db3d6a3cf7 Use GXInboundResponse to access to the response returned by the resource methods.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@163183 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-12 05:10:11 +00:00
Manuele Simi 58e3ef8a37 Comply with the new gxRest package organization.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@163181 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-12 05:00:49 +00:00
Manuele Simi 78919bce5a Use GXErrorOutboundResponse and GXOutboundSuccessResponse from gxRest to return a response in the create and delete methods.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@163003 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-07 04:48:30 +00:00
Manuele Simi 9654a44e67 Adapt response for the create method to gxRest.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162900 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-04 20:33:59 +00:00
Manuele Simi 3650407264 Clean up code moved to gxRest.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162886 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-04 04:38:16 +00:00
Manuele Simi de8582c9be Migrate resource manager components to gxRest.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162885 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-04 04:36:56 +00:00
Manuele Simi 3f71638206 Make the deserializers final. Reduce their visibility at package level.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162830 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-01 03:42:42 +00:00
Manuele Simi 85bacd7afe Test the ErrorCode after with the new deserialization of the entity.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162829 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-02-01 03:32:56 +00:00
Manuele Simi 3adf77e8bd Add deserializers for ErrorCode and Exception. This makes the serializable entity a POJO.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162801 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-31 14:31:01 +00:00
Manuele Simi 2d80258f83 Keep the full qualified class name and message for the exception in the response. Rebuild the response at client side with reflection.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162764 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-31 05:35:13 +00:00
Manuele Simi f2fdc26d69 Fix create context with parent. Check if the context client is null before invoking the validation of the request.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162504 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-24 04:48:18 +00:00
Manuele Simi de32c0135c Load the default token from a property file for Queries test. Skip the tests if the token is null.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162503 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-24 04:10:52 +00:00
Manuele Simi 8880bdddde Handle the case when the resource registry returns an exception when checking if the parent context exists.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162454 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 04:35:19 +00:00
Manuele Simi 731dc6bde7 Adjust check on returned status in the create test case.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162453 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 04:25:25 +00:00
Manuele Simi 5fe6234303 Add logger to RMContextTest.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162452 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 04:23:20 +00:00
Manuele Simi 34dcfec6e6 Load the default token from a property file. Skip the tests if the token is null.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162451 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-23 03:48:33 +00:00
Manuele Simi 4a7df8b36d Update tests for create context with or without parent. Still some pitfalls to address.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162408 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-22 04:31:01 +00:00
Manuele Simi eb900141e2 Validate the parent exists in the create operation, if specified in the input context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162406 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-21 20:38:19 +00:00
Manuele Simi 97e9f88f70 Use LocalCodeExceptions across delete and create contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162405 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-21 20:34:21 +00:00
Manuele Simi 865c2255f7 Introduce error codes for the delete context method. Query the RR to validate the delete request.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162342 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 05:05:49 +00:00
Manuele Simi f1e50d4d15 Add step2_Delete test case to delete a context. The sequential tests now are able to create and delete the test contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162341 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 04:15:31 +00:00
Manuele Simi 9c3f356eb4 Change UUID param for context delete to be a @PathParam.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162340 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 04:13:45 +00:00
Manuele Simi 53f07d6d61 RMContextTest: extend step0 to check the validity of UUID and name.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162339 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-19 03:13:34 +00:00
Manuele Simi f08c550f1d Rename RMCode to RMCreateContextCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162299 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-18 05:05:35 +00:00
Manuele Simi 60a49651a5 More work on delete method.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162207 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-16 03:57:22 +00:00
Manuele Simi b4faa918a5 Improve test cases for resource methods and queries.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162206 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-16 03:34:25 +00:00
Manuele Simi 54f89d7681 Migrate to use ResourceRegistryContextClient to query Contexts.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162169 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 12:14:41 +00:00
Manuele Simi 4336297bcd Starting to shape the DeleteRequest and delete resource method.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162161 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:55:32 +00:00
Manuele Simi 4c161325cd Add test case to fetch the Context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162160 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:29:33 +00:00
Manuele Simi ef245330c7 Queries to check if a context exists and to fetch a context given its UUID
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162159 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-15 03:19:32 +00:00
Manuele Simi 4e6d0a1192 Rename package exceptions to codeexceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162028 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 04:12:00 +00:00
Manuele Simi aedbeed7de Draft delete method's signature in the RMContext resource.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162027 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:13:01 +00:00
Manuele Simi 37b5f00beb Fix typo in RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162026 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:11:59 +00:00
Manuele Simi 8d4941ef21 Rename CodeException to LocalCodeException.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162025 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-10 03:09:32 +00:00
Manuele Simi 3b4e4b17a8 Improve javadoc. Rename one of the values for RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161971 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-04 20:09:37 +00:00
Manuele Simi fc90485dca Set calledMethod for create context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161941 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-03 03:41:33 +00:00
Manuele Simi 2240582f2c Add plain CodeException to use internally in the webapp. WebCodeExceptions can be created from plain exceptions now. New test cases for exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161932 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-02 03:13:00 +00:00
Manuele Simi 8aff6e850e Adapt CodeExceptionTest to web exceptions.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161931 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-02 02:57:11 +00:00
Manuele Simi a70350c9df Rename CodeException to WebCodeException to make it clear that it is a subclass of WebAppException.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161930 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-01 20:40:26 +00:00
Manuele Simi 5c9549160c Move RMCode to rs package. This keeps the exceptions package as more generic as possible.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161929 82a268e6-3cf1-43bd-a215-b396298e98cf
2018-01-01 20:37:28 +00:00
Manuele Simi f94fd01063 Fix javadoc.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161928 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 19:21:11 +00:00
Manuele Simi c1c79bf30d Add CodeFinder helper class to find codes and convert them into their equivalent enum value.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161927 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 17:46:27 +00:00
Manuele Simi 0dbd823c26 Convert back the SerializableErrorCode to the correspondent RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161926 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 04:28:16 +00:00
Manuele Simi 38feed8fdb Remove fields in the CodeException. The code and associated message are held in the response embedded in the superclass.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161925 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-29 03:25:00 +00:00
Manuele Simi 77b0722bf1 Initialize CodeException from ErrorCode instead of RMCode.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161923 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-28 05:14:55 +00:00
Manuele Simi 33c6212530 Rewrite CodeException as a specialized WebApplicationException. Integrate CodeException in the create context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161922 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-28 05:06:00 +00:00
Manuele Simi 36dd483b04 Integrate CodeExceptions in the webapp.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161909 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:23:48 +00:00
Manuele Simi 0743f01692 Remove duplicated package-info.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161908 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:14:52 +00:00
Manuele Simi 228f1a54b8 Adjust test in error.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161907 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:13:55 +00:00
Manuele Simi 8fc30f39c6 Remove unused packages.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161906 82a268e6-3cf1-43bd-a215-b396298e98cf
2017-12-26 12:07:49 +00:00