Change payload to Map<String,Object> so it's more versatile
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / main / java / org / onap / policy / controlloop / actorserviceprovider / parameters / CommonActorParams.java
index dc6f2b6..b8218e5 100644 (file)
@@ -33,18 +33,22 @@ import org.onap.policy.controlloop.actorserviceprovider.Util;
 
 /**
  * Superclass for Actor parameters that have default values in "this" object, and
- * operation-specific values in {@link #operation}.
+ * operation-specific values in {@link #operations}.
  */
 @Getter
 @Setter
 @EqualsAndHashCode
 public class CommonActorParams {
+    /**
+     * Name of the "operations" field contained within actor parameters.
+     */
+    public static final String OPERATIONS_FIELD = "operations";
 
     /**
      * Maps the operation name to its parameters.
      */
     @NotNull
-    protected Map<String, Map<String, Object>> operation;
+    protected Map<String, Map<String, Object>> operations;
 
 
     /**
@@ -57,10 +61,10 @@ public class CommonActorParams {
     public Function<String, Map<String, Object>> makeOperationParameters(String name) {
 
         Map<String, Object> defaultParams = Util.translateToMap(name, this);
-        defaultParams.remove("operation");
+        defaultParams.remove(OPERATIONS_FIELD);
 
         return operationName -> {
-            Map<String, Object> specificParams = operation.get(operationName);
+            Map<String, Object> specificParams = operations.get(operationName);
             if (specificParams == null) {
                 return null;
             }