Fixed a typo in a name 79/74579/1
authorfpaquett <francis.paquette@amdocs.com>
Wed, 12 Dec 2018 15:22:38 +0000 (10:22 -0500)
committerfpaquett <francis.paquette@amdocs.com>
Wed, 12 Dec 2018 15:22:38 +0000 (10:22 -0500)
Issue-ID: AAI-1999
Change-Id: I40bcb53eeb9738b4d395cb0202a921c7d75791bb
Signed-off-by: Francis Paquette <francis.paquette@amdocs.com>
src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java
src/main/java/org/onap/aai/datarouter/entity/SpikeEventEntity.java
src/main/java/org/onap/aai/datarouter/policy/EntityEventPolicy.java
src/main/java/org/onap/aai/datarouter/policy/SpikeEntitySearchProcessor.java
src/main/resources/entitysearch_schema.json

index 70fd6e4..04dc065 100644 (file)
@@ -125,7 +125,7 @@ public class AaiEventEntity implements DocumentStoreDataEntity, Serializable {
 
     JsonObject obj = Json.createObjectBuilder().add("entityType", entityType)
         .add("entityPrimaryKeyValue", entityPrimaryKeyValue).add("searchTagIDs", searchTagIds)
-        .add("searchTags", searchTags).add("crossEntityReferenceValues", crossReferenceEntityValues)
+        .add("searchTags", searchTags).add("crossReferenceEntityValues", crossReferenceEntityValues)
         .add("lastmodTimestamp", lastmodTimestamp).add("link", link).build();
 
     return obj.toString();
index 9bfd8a0..163f819 100644 (file)
@@ -118,7 +118,7 @@ public class SpikeEventEntity implements DocumentStoreDataEntity, Serializable {
 
     JsonObject obj = Json.createObjectBuilder().add("entityType", entityType)
         .add("entityPrimaryKeyValue", entityPrimaryKeyValue).add("searchTagIDs", searchTagIds)
-        .add("searchTags", searchTags).add("crossEntityReferenceValues", crossReferenceEntityValues)
+        .add("searchTags", searchTags).add("crossReferenceEntityValues", crossReferenceEntityValues)
         .add("lastmodTimestamp", lastmodTimestamp).add("link", link).build();
 
     return obj.toString();
index 6660a79..152baf3 100644 (file)
@@ -907,7 +907,7 @@ public class EntityEventPolicy implements Processor {
         if (!sourceObject.isEmpty()) {
           JsonNode node = sourceObject.get(0);
           final String sourceCer = NodeUtils.extractFieldValueFromObject(node, 
-              "crossEntityReferenceValues");
+              "crossReferenceEntityValues");
           String newCer = aaiEventEntity.getCrossReferenceEntityValues();
           boolean hasNewCer = true;
           if (sourceCer != null && sourceCer.length() > 0){ // already has CER
@@ -920,7 +920,7 @@ public class EntityEventPolicy implements Processor {
           
           if (hasNewCer){
             // Do the PUT with new CER
-            ((ObjectNode)node).put("crossEntityReferenceValues", newCer);
+            ((ObjectNode)node).put("crossReferenceEntityValues", newCer);
             jsonPayload = NodeUtils.convertObjectToJson(node, false);
             searchAgent.putDocument(entitySearchIndex, entityId, jsonPayload, headers);
           }
index 8b43b1b..98d93d1 100644 (file)
@@ -115,13 +115,13 @@ public class SpikeEntitySearchProcessor extends AbstractSpikeEntityEventProcesso
    * "content", sourceObject);
    * 
    * if (!sourceObject.isEmpty()) { JsonNode node = sourceObject.get(0); final String sourceCer =
-   * NodeUtils.extractFieldValueFromObject(node, "crossEntityReferenceValues"); String newCer =
+   * NodeUtils.extractFieldValueFromObject(node, "crossReferenceEntityValues"); String newCer =
    * spikeEventEntity.getCrossReferenceEntityValues(); boolean hasNewCer = true; if (sourceCer !=
    * null && sourceCer.length() > 0) { // already has CER if (!sourceCer.contains(newCer)) {// don't
    * re-add newCer = sourceCer + ";" + newCer; } else { hasNewCer = false; } }
    * 
    * if (hasNewCer) { // Do the PUT with new CER ((ObjectNode)
-   * node).put("crossEntityReferenceValues", newCer); jsonPayload =
+   * node).put("crossReferenceEntityValues", newCer); jsonPayload =
    * NodeUtils.convertObjectToJson(node, false); searchAgent.putDocument(entitySearchIndex,
    * entityId, jsonPayload, headers); } } } else {
    * 
index 5ff7625..a5cab03 100644 (file)
@@ -22,7 +22,7 @@
            "index-analyzer": "ngram_analyzer"
       },
       {
-           "name": "crossEntityReferenceValues", 
+           "name": "crossReferenceEntityValues",
            "data-type": "string", 
            "index-analyzer": "ngram_analyzer"
       },