Rework the Clds DAO and properties associated
[clamp.git] / src / main / java / org / onap / clamp / clds / model / prop / Global.java
index f8986b3..2fb7d50 100644 (file)
@@ -5,16 +5,16 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END============================================
  * ===================================================================
 
 package org.onap.clamp.clds.model.prop;
 
-import com.fasterxml.jackson.databind.JsonNode;
-
 import java.util.List;
-import java.util.logging.Logger;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.databind.JsonNode;
 
 /**
  * Parse global json properties.
  * <p>
- * Example json: "global":[{"name":"service","value":["vUSP"]},{"name":"vnf","value":["vCTS","v3CDB"]},{"name":"location","value":["san_diego","san_antonio","kansas_city","kings_mountain","Secaucus","lisle","concord","houston","akron"]}]
+ * Example json:
+ * "global":[{"name":"service","value":["vUSP"]},{"name":"vnf","value":["vCTS",
+ * "v3CDB"]},{"name":"location","value":["san_diego","san_antonio","kansas_city"
+ * ,"kings_mountain","Secaucus","lisle","concord","houston","akron"]}]
  */
 public class Global {
-    private static final Logger logger = Logger.getLogger(Global.class.getName());
+    protected static final EELFLogger       logger      = EELFManager.getInstance().getLogger(Global.class);
+    protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
-    private String service;
-    private List<String> resourceVf;
-    private List<String> resourceVfc;
-    private List<String> location;
+    private String                  service;
+    private String                  actionSet;
+    private List<String>            resourceVf;
+    private List<String>            resourceVfc;
+    private List<String>            location;
 
     /**
      * Parse global given json node.
@@ -49,6 +55,7 @@ public class Global {
     public Global(JsonNode modelJson) {
         JsonNode globalNode = modelJson.get("global");
         service = ModelElement.getValueByName(globalNode, "service");
+        actionSet = ModelElement.getValueByName(globalNode, "actionSet");
         resourceVf = ModelElement.getValuesByName(globalNode, "vf");
         resourceVfc = ModelElement.getValuesByName(globalNode, "vfc");
         location = ModelElement.getValuesByName(globalNode, "location");
@@ -62,12 +69,20 @@ public class Global {
     }
 
     /**
-     * @param service the service to set
+     * @param service
+     *            the service to set
      */
     public void setService(String service) {
         this.service = service;
     }
 
+    /**
+     * @return the actionSet
+     */
+    public String getActionSet() {
+        return actionSet;
+    }
+
     /**
      * @return the resourceVf
      */
@@ -76,7 +91,8 @@ public class Global {
     }
 
     /**
-     * @param resourceVf the resourceVf to set
+     * @param resourceVf
+     *            the resourceVf to set
      */
     public void setResourceVf(List<String> resourceVf) {
         this.resourceVf = resourceVf;
@@ -90,7 +106,8 @@ public class Global {
     }
 
     /**
-     * @param resourceVfc the resourceVfc to set
+     * @param resourceVfc
+     *            the resourceVfc to set
      */
     public void setResourceVfc(List<String> resourceVfc) {
         this.resourceVfc = resourceVfc;
@@ -104,7 +121,8 @@ public class Global {
     }
 
     /**
-     * @param location the location to set
+     * @param location
+     *            the location to set
      */
     public void setLocation(List<String> location) {
         this.location = location;