2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Modifications Copyright (c) 2019 Samsung
9 * ================================================================================
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 * ============LICENSE_END============================================
22 * ===================================================================
26 package org.onap.clamp.clds.model.properties;
28 import com.att.eelf.configuration.EELFLogger;
29 import com.att.eelf.configuration.EELFManager;
30 import com.google.gson.JsonElement;
31 import com.google.gson.JsonObject;
33 import java.util.Map.Entry;
37 * Parse ONAP Tca json properties.
39 public class Tca extends AbstractModelElement {
41 protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Tca.class);
42 protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
44 private TcaItem tcaItem;
46 private static final String TYPE_TCA = "tca";
49 * Parse Tca given json node.
51 * @param modelBpmn The model bpmn
52 * @param modelJson The model json
54 public Tca(ModelBpmn modelBpmn, JsonObject modelJson) {
55 super(TYPE_TCA, modelBpmn, modelJson);
57 // process Server_Configurations
58 if (modelElementJsonNode != null) {
59 //this is wrong assumption that there is only one property object
60 Set<Entry<String, JsonElement>> entries = modelElementJsonNode.getAsJsonObject().entrySet();
61 tcaItem = new TcaItem(entries.iterator().next().getValue());
65 public TcaItem getTcaItem() {
69 public static final String getType() {