Delay DB updates until all policies processed 08/84408/3
authorJim Hahn <jrh3@att.com>
Fri, 5 Apr 2019 21:02:06 +0000 (17:02 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 5 Apr 2019 23:35:55 +0000 (19:35 -0400)
commit8d554587553ab5bd5dff66db81fb45f82f46278c
treeee8e3fc69df24d0b51b1e313702f9cb5d6bf75d4
parent92e0c7a0845be859039b315235fc9025b8363977
Delay DB updates until all policies processed

If an exception is thrown in the middle of processing policies, it's
possible for the DB to reflect a partial deployment.  This change
queues the DB changes so that they're all made at once, after all
policies have been processed.
Extracted sort() into a common place.
Corrected some comments.
Simplified the list retrieval in the junits since all DB creates and
updates are now batched together into one operation each.

Change-Id: I835175fc16d4042c741d36ec69caa8f603d46d5a
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pap/main/rest/depundep/GroupData.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pap/main/rest/depundep/ProviderBase.java
main/src/main/java/org/onap/policy/pap/main/rest/depundep/SessionData.java
main/src/test/java/org/onap/policy/pap/main/rest/depundep/ProviderSuper.java
main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestGroupData.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestPdpGroupDeployProvider.java
main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestProviderBase.java
main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestSessionData.java
main/src/test/resources/simpleDeploy/getGroupDao.json