summaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
authorMaharajh, Robby (rx2202) <rx2202@att.com>2018-09-20 18:44:26 -0400
committerMaharajh, Robby (rx2202) <rx2202@att.com>2018-09-20 18:44:26 -0400
commit8f0c12b8d7311eeeccbf5483901182747cb813e2 (patch)
tree30e0517eb77529f0afefa040ffeaa7f1906601c2 /aai-resources
parente79fac80b32b6d76ecfe3abfe840197b09b13608 (diff)
Update the code to use realtime connection
for PUT/PATCH/DELETE to make it less likely to cause duplicates in the AAI Database Issue-ID: AAI-1667 Change-Id: I029c505193ff6d9533743732375e9a669ed9d1ca Signed-off-by: Maharajh, Robby (rx2202) <rx2202@att.com>
Diffstat (limited to 'aai-resources')
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java8
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/bulk/BulkSingleTransactionConsumer.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
index d6ec93a..17f8f64 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
@@ -126,7 +126,7 @@ public abstract class BulkConsumer extends RESTAPI {
Response response = null;
try {
- DBConnectionType type = this.determineConnectionType(sourceOfTruth, realTime);
+ DBConnectionType type = DBConnectionType.REALTIME;
String serviceName = req.getMethod() + " " + req.getRequestURI().toString();
LoggingContext.requestId(transId);
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
index 3c2754d..4e5b10b 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
@@ -131,7 +131,7 @@ public class LegacyMoxyConsumer extends RESTAPI {
try {
validateRequest(info);
SchemaVersion version = new SchemaVersion(versionParam);
- DBConnectionType type = this.determineConnectionType(sourceOfTruth, realTime);
+ DBConnectionType type = DBConnectionType.REALTIME;
HttpEntry traversalUriHttpEntry = SpringContextAware.getBean("traversalUriHttpEntry", HttpEntry.class);
traversalUriHttpEntry.setHttpEntryProperties(version, type);
loader = traversalUriHttpEntry.getLoader();
@@ -352,7 +352,7 @@ public class LegacyMoxyConsumer extends RESTAPI {
validateRequest(info);
SchemaVersion version = new SchemaVersion(versionParam);
- DBConnectionType type = this.determineConnectionType(sourceOfTruth, realTime);
+ DBConnectionType type = DBConnectionType.REALTIME;
HttpEntry traversalUriHttpEntry = SpringContextAware.getBean("traversalUriHttpEntry", HttpEntry.class);
traversalUriHttpEntry.setHttpEntryProperties(version, type);
dbEngine = traversalUriHttpEntry.getDbEngine();
@@ -426,7 +426,7 @@ public class LegacyMoxyConsumer extends RESTAPI {
try {
this.validateRequest(info);
SchemaVersion version = new SchemaVersion(versionParam);
- DBConnectionType type = this.determineConnectionType(sourceOfTruth, realTime);
+ DBConnectionType type = DBConnectionType.REALTIME;
HttpEntry traversalUriHttpEntry = SpringContextAware.getBean("traversalUriHttpEntry", HttpEntry.class);
traversalUriHttpEntry.setHttpEntryProperties(version, type);
loader = traversalUriHttpEntry.getLoader();
@@ -535,7 +535,7 @@ public class LegacyMoxyConsumer extends RESTAPI {
validateRequest(info);
version = new SchemaVersion(versionParam);
- DBConnectionType type = this.determineConnectionType(sourceOfTruth, realTime);
+ DBConnectionType type = DBConnectionType.REALTIME;
HttpEntry traversalUriHttpEntry = SpringContextAware.getBean("traversalUriHttpEntry", HttpEntry.class);
traversalUriHttpEntry.setHttpEntryProperties(version, type);
loader = traversalUriHttpEntry.getLoader();
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/bulk/BulkSingleTransactionConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/bulk/BulkSingleTransactionConsumer.java
index 1e6ab0c..03cfa8f 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/bulk/BulkSingleTransactionConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/bulk/BulkSingleTransactionConsumer.java
@@ -74,7 +74,7 @@ public class BulkSingleTransactionConsumer extends RESTAPI {
initLogging(req, transId, sourceOfTruth);
try {
- type = this.determineConnectionType(sourceOfTruth, realTime);
+ type = DBConnectionType.REALTIME;
// unmarshall the payload.
Gson gson = new Gson();