You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »


References

https://jira.onap.org/browse/CPS-1586

Add support for persisting of top level list nodes

Issues & Decisions

#

ISSUES

      Description

DECISIONS

1Adding a list element to a root list node does not add element in parent list but in child list element (Add list element API). 

By using add list element(s) API, when added an element to root level list node, data node is added to child node not to parent list node.

CPS-1586 - Getting issue details... STATUS

For top level list nodes when new elements are added to root list nodes, first element in the root list nodes treated as parent node. so we need to change logic to store list nodes. 
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.
Integration Tests
  • CpsDataServiceIntegrationSpec.groovy
    • Add and Delete top-level list (element) data nodes with root node







  • No labels