Merge "Infrastructure for having mutiple RIC APIs"
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / repository / Ric.java
index 82d84f1..4169150 100644 (file)
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Vector;
 
+import org.oransc.policyagent.clients.A1Client.A1ProtocolType;
 import org.oransc.policyagent.configuration.RicConfig;
 
 /**
@@ -32,8 +33,9 @@ import org.oransc.policyagent.configuration.RicConfig;
  */
 public class Ric {
     private final RicConfig ricConfig;
-    private RicState state = RicState.NOT_INITIATED;
+    private RicState state = RicState.UNDEFINED;
     private Map<String, PolicyType> supportedPolicyTypes = new HashMap<>();
+    private A1ProtocolType protocolVersion = A1ProtocolType.UNKNOWN;
 
     /**
      * Creates the Ric. Initial state is {@link RicState.NOT_INITIATED}.
@@ -150,16 +152,26 @@ public class Ric {
      */
     public static enum RicState {
         /**
-         * The Ric has not been initiated yet.
+         * The agent view of the agent may be inconsistent
          */
-        NOT_INITIATED,
+        UNDEFINED,
         /**
-         * The Ric is working fine.
+         * The normal state. Policies can be configured.
          */
-        ACTIVE,
+        IDLE,
         /**
-         * The Ric cannot be contacted.
+         * The Ric states are recovered
          */
-        NOT_REACHABLE, RECOVERING
+        RECOVERING
     }
+
+    public A1ProtocolType getProtocolVersion() {
+        return protocolVersion;
+    }
+
+    public void setProtocolVersion(A1ProtocolType version) {
+        protocolVersion = version;
+
+    }
+
 }