[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / policy / std / MatchStore.java
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.policy.std;
+package org.onap.policy.std;
 
 import java.util.Collection;
 import java.util.HashSet;
 
-import org.openecomp.policy.api.LoadedPolicy;
-import org.openecomp.policy.api.NotificationType;
-import org.openecomp.policy.api.PDPNotification;
-import org.openecomp.policy.api.RemovedPolicy;
-import org.openecomp.policy.std.StdLoadedPolicy;
-import org.openecomp.policy.std.StdPDPNotification;
-import org.openecomp.policy.std.StdRemovedPolicy;
+import org.onap.policy.api.LoadedPolicy;
+import org.onap.policy.api.NotificationType;
+import org.onap.policy.api.PDPNotification;
+import org.onap.policy.api.RemovedPolicy;
+import org.onap.policy.std.StdLoadedPolicy;
+import org.onap.policy.std.StdPDPNotification;
+import org.onap.policy.std.StdRemovedPolicy;
 
-import org.openecomp.policy.common.logging.flexlogger.*; 
+import org.onap.policy.common.logging.flexlogger.*; 
 
 public class MatchStore {
        private static HashSet<Matches> matchStore = new HashSet<>();
@@ -50,8 +50,8 @@ public class MatchStore {
                                // Check if it is a new Match
                                Boolean match = false;
                                for(Matches oldMatch: matchStore){
-                                       // Compare ECOMPName
-                                       if(oldMatch.getEcompName().equals(newMatch.getEcompName())){
+                                       // Compare ONAPName
+                                       if(oldMatch.getOnapName().equals(newMatch.getOnapName())){
                                                // Compare ConfigName if it exists. 
                                                if(newMatch.getConfigName()!=null && oldMatch.getConfigName()!=null){
                                                        if(oldMatch.getConfigName().equals(newMatch.getConfigName())){
@@ -138,14 +138,14 @@ public class MatchStore {
                                                // Again Better way would be comparing sizes first.
                                                // Matches are different need to check if has configAttributes
                                                if(match.getConfigAttributes()!=null && !match.getConfigAttributes().isEmpty()){
-                                                       // adding ecomp and config to config-attributes. 
+                                                       // adding onap and config to config-attributes. 
                                                        int compValues = match.getConfigAttributes().size() + 2;
                                                        if(updatedPolicy.getMatches().size()== compValues){
                                                                // Comparing both the values.. 
                                                                boolean matchAttributes = false;
                                                                for(String newKey: updatedPolicy.getMatches().keySet()){
-                                                                       if(newKey.equals("ECOMPName")){
-                                                                               if(updatedPolicy.getMatches().get(newKey).equals(match.getEcompName())){
+                                                                       if(newKey.equals("ONAPName")){
+                                                                               if(updatedPolicy.getMatches().get(newKey).equals(match.getOnapName())){
                                                                                        matchAttributes = true;
                                                                                }else {
                                                                                        matchAttributes = false;
@@ -184,7 +184,7 @@ public class MatchStore {
                                                }else if(match.getConfigName()!=null){
                                                        // If there are no config Attributes then check if it has Config Name
                                                        if(updatedPolicy.getMatches().size()== 2){
-                                                               if(updatedPolicy.getMatches().get("ECOMPName").equals(match.getEcompName())){
+                                                               if(updatedPolicy.getMatches().get("ONAPName").equals(match.getOnapName())){
                                                                        if(updatedPolicy.getMatches().get("ConfigName").equals(match.getConfigName())){
                                                                                // Match..
                                                                                matched = true;
@@ -198,9 +198,9 @@ public class MatchStore {
                                                                break;
                                                        }
                                                }else {
-                                                       // If non exist then assuming the ECOMP Name to be there. 
+                                                       // If non exist then assuming the ONAP Name to be there. 
                                                        if(updatedPolicy.getMatches().size()== 1){
-                                                               if(updatedPolicy.getMatches().get("ECOMPName").equals(match.getEcompName())){
+                                                               if(updatedPolicy.getMatches().get("ONAPName").equals(match.getOnapName())){
                                                                        // Match.. 
                                                                        matched = true;
                                                                }else {