F1 (Java) Story 15: Service methods for CollaborationProject Resources operations
Description
#66 (closed) adds /projects/{id}/resources API endpoint. Need to provide corresponding service layer for all its CRUD methods.
Acceptance criteria
All new API methods are provisioned with corresponding Service layer methods. When the API requested, pointed resource data is validated,
Logic:
-
check if CP record has data.TrustedResourcesID not empty 1.1. if empty - we create a record of CollaborationProjectResources kind and set it to CP's data.TrustedResourcesID 1.2. if not empty - we get existing CollaborationProjectResources record
-
changes are applied (add/delete) to the CollaborationProjectResources
data.ResourcesIDs[]
list.
PS: inform users if they try to delete non-existing resources references
Testing scenarios
- All necessary unit tests implemented
- Integration tests for all API methods with correct and incorrect payloads are added