Make use of Lombok
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / repository / Ric.java
index 235ee1a..220477f 100644 (file)
@@ -25,6 +25,10 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Vector;
 
+import lombok.Getter;
+import lombok.Setter;
+
+import org.oransc.policyagent.clients.A1Client.A1ProtocolType;
 import org.oransc.policyagent.configuration.RicConfig;
 
 /**
@@ -32,8 +36,13 @@ import org.oransc.policyagent.configuration.RicConfig;
  */
 public class Ric {
     private final RicConfig ricConfig;
+    @Getter
+    @Setter
     private RicState state = RicState.UNDEFINED;
     private Map<String, PolicyType> supportedPolicyTypes = new HashMap<>();
+    @Getter
+    @Setter
+    private A1ProtocolType protocolVersion = A1ProtocolType.UNKNOWN;
 
     /**
      * Creates the Ric. Initial state is {@link RicState.NOT_INITIATED}.
@@ -48,14 +57,6 @@ public class Ric {
         return ricConfig.name();
     }
 
-    public RicState state() {
-        return state;
-    }
-
-    public void setState(RicState newState) {
-        state = newState;
-    }
-
     public RicConfig getConfig() {
         return this.ricConfig;
     }
@@ -150,7 +151,7 @@ public class Ric {
      */
     public static enum RicState {
         /**
-         * The agent view of the agent may be inconsistent
+         * The agent view of the agent may be inconsistent.
          */
         UNDEFINED,
         /**
@@ -158,7 +159,7 @@ public class Ric {
          */
         IDLE,
         /**
-         * The Ric states are recovered
+         * The Ric states are recovered.
          */
         RECOVERING
     }