CPS-765 Post List Element to allow top level list element
https://lf-onap.atlassian.net/browse/CPS-765
Implementation Proposal
We will be augmenting the existing CPS-Core endpoint /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes?xpath=/
REST Layer
DataRestController.java
Add a check in addListElements to see if the parent xpath is a root path ("/"). If root node, create passed list element as top node. Else add passed list element to parent xpath node.
DataRestControllerSpec.groovy
Add test for scenario above
Service Layer
CpsDataService.java
Overload saveListElements method with implementation for no parentNodeXpath
CpsDataServiceImpl.java
Overload saveListElements method with implementation for no parentNodeXpath
buildDataNodes and call new method storeListElements in Persistence Layer
Persistence Layer
CpsDataPersistenceService.java
new method storeListElements
CpsDataPersistenceServiceImpl.java
new method storeListElements, converts datanodes to fragment repository and saves it.