2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 package org.onap.clamp.clds.model.prop;
26 import java.util.List;
28 import com.att.eelf.configuration.EELFLogger;
29 import com.att.eelf.configuration.EELFManager;
30 import com.fasterxml.jackson.databind.JsonNode;
33 * Parse global json properties.
36 * "global":[{"name":"service","value":["vUSP"]},{"name":"vnf","value":["vCTS",
37 * "v3CDB"]},{"name":"location","value":["san_diego","san_antonio","kansas_city"
38 * ,"kings_mountain","Secaucus","lisle","concord","houston","akron"]}]
41 protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Global.class);
42 protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
44 private String service;
45 private String actionSet;
46 private List<String> resourceVf;
47 private List<String> resourceVfc;
48 private List<String> location;
51 * Parse global given json node.
55 public Global(JsonNode modelJson) {
56 JsonNode globalNode = modelJson.get("global");
57 service = ModelElement.getValueByName(globalNode, "service");
58 actionSet = ModelElement.getValueByName(globalNode, "actionSet");
59 resourceVf = ModelElement.getValuesByName(globalNode, "vf");
60 resourceVfc = ModelElement.getValuesByName(globalNode, "vfc");
61 location = ModelElement.getValuesByName(globalNode, "location");
67 public String getService() {
75 public void setService(String service) {
76 this.service = service;
80 * @return the actionSet
82 public String getActionSet() {
87 * @return the resourceVf
89 public List<String> getResourceVf() {
95 * the resourceVf to set
97 public void setResourceVf(List<String> resourceVf) {
98 this.resourceVf = resourceVf;
102 * @return the resourceVfc
104 public List<String> getResourceVfc() {
110 * the resourceVfc to set
112 public void setResourceVfc(List<String> resourceVfc) {
113 this.resourceVfc = resourceVfc;
117 * @return the location
119 public List<String> getLocation() {
125 * the location to set
127 public void setLocation(List<String> location) {
128 this.location = location;