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 com.att.eelf.configuration.EELFLogger;
27 import com.att.eelf.configuration.EELFManager;
28 import com.fasterxml.jackson.databind.JsonNode;
30 import java.util.ArrayList;
31 import java.util.Iterator;
32 import java.util.List;
35 * Parse Tca json properties.
38 * {"TCA_0lm6cix":{"Narra":[{"name":"tname","value":"Narra"},{"name":"tcaEnab",
39 * "value":"on"},{"name":"tcaPol","value":"Polcicy1"},{"name":"tcaPolId","value"
40 * :"1"},{"name":"tcaInt","value":"1"},{"name":"tcaSev","value":"Critical"},{
41 * "name":"tcaVio","value":"1"},{"serviceConfigurations":[["FIELDPATH_test_1",
42 * ">","4"],["FIELDPATH_test_1","=","5"]]}],"Srini":[{"name":"tname","value":
43 * "Srini"},{"name":"tcaEnab","value":"on"},{"name":"tcaPol","value":"Policy1"},
44 * {"name":"tcaPolId","value":"1"},{"name":"tcaInt","value":"1"},{"name":
45 * "tcaSev","value":"Major"},{"name":"tcaVio","value":"1"},{
46 * "serviceConfigurations":[["FIELDPATH_test_2","=","3"],["FIELDPATH_test_1",">"
51 public class Tca extends AbstractModelElement {
53 protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Tca.class);
54 protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
56 private List<TcaItem> tcaItems;
58 private static final String TYPE_TCA = "tca";
61 * Parse Tca given json node
67 public Tca(ModelProperties modelProp, ModelBpmn modelBpmn, JsonNode modelJson) {
68 super(TYPE_TCA, modelProp, modelBpmn, modelJson);
70 // process Server_Configurations
71 if (modelElementJsonNode != null) {
72 Iterator<JsonNode> itr = modelElementJsonNode.elements();
73 tcaItems = new ArrayList<>();
74 while (itr.hasNext()) {
75 tcaItems.add(new TcaItem(itr.next()));
80 public List<TcaItem> getTcaItems() {
84 public static final String getType() {