* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* Modified Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* Modified Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* 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.
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.onap.policy.common.logging.eelf.MessageCodes;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.onap.policy.common.logging.eelf.MessageCodes;
private MicroServiceModels newModel = null;
private HashMap<String, MSAttributeObject> classMap = new HashMap<>();
private MicroServiceModels newModel = null;
private HashMap<String, MSAttributeObject> classMap = new HashMap<>();
private MSModelUtils utils = new MSModelUtils(XACMLPapServlet.getMsOnapName(), XACMLPapServlet.getMsPolicyName());
public CreateNewMicroServiceModel(String fileName, String serviceName, String string, String version) {
private MSModelUtils utils = new MSModelUtils(XACMLPapServlet.getMsOnapName(), XACMLPapServlet.getMsPolicyName());
public CreateNewMicroServiceModel(String fileName, String serviceName, String string, String version) {
returnReferenceList.put(modelName, utils.getReferenceAttributes());
msAttributes.setRefAttribute(returnReferenceList);
returnReferenceList.put(modelName, utils.getReferenceAttributes());
msAttributes.setRefAttribute(returnReferenceList);
LinkedHashMap<String, String> enumList = new LinkedHashMap<>();
String[] listArray = utils.getListConstraints().split("#");
for (String str : listArray) {
LinkedHashMap<String, String> enumList = new LinkedHashMap<>();
String[] listArray = utils.getListConstraints().split("#");
for (String str : listArray) {
if (".yml".equalsIgnoreCase(type)) {
newModel.setDependency("[]");
if (mainClass.getSubClass() != null) {
String value = new Gson().toJson(mainClass.getSubClass());
if (".yml".equalsIgnoreCase(type)) {
newModel.setDependency("[]");
if (mainClass.getSubClass() != null) {
String value = new Gson().toJson(mainClass.getSubClass());
String refAttributes = mainClass.getRefAttribute().toString().replace("{", "").replace("}", "");
int equalsIndex = refAttributes.indexOf("=");
String refAttributesAfterFirstEquals = refAttributes.substring(equalsIndex + 1);
String refAttributes = mainClass.getRefAttribute().toString().replace("{", "").replace("}", "");
int equalsIndex = refAttributes.indexOf("=");
String refAttributesAfterFirstEquals = refAttributes.substring(equalsIndex + 1);
if (mainClass.getAttribute() != null && !mainClass.getAttribute().isEmpty()) {
this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", ""));
}
if (mainClass.getRefAttribute() != null && !mainClass.getRefAttribute().isEmpty()) {
this.newModel
if (mainClass.getAttribute() != null && !mainClass.getAttribute().isEmpty()) {
this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", ""));
}
if (mainClass.getRefAttribute() != null && !mainClass.getRefAttribute().isEmpty()) {
this.newModel
model.setDependency(this.newModel.getDependency());
model.setDescription(this.newModel.getDescription());
model.setEnumValues(this.newModel.getEnumValues());
model.setDependency(this.newModel.getDependency());
model.setDescription(this.newModel.getDescription());
model.setEnumValues(this.newModel.getEnumValues());
- model.setRef_attributes(this.newModel.getRef_attributes());
- model.setSub_attributes(this.newModel.getSub_attributes());
+ model.setRefAttributes(this.newModel.getRefAttributes());
+ model.setSubAttributes(this.newModel.getSubAttributes());
model.setDataOrderInfo(this.newModel.getDataOrderInfo());
model.setDecisionModel(this.newModel.isDecisionModel());
model.setRuleFormation(this.newModel.getRuleFormation());
model.setDataOrderInfo(this.newModel.getDataOrderInfo());
model.setDecisionModel(this.newModel.isDecisionModel());
model.setRuleFormation(this.newModel.getRuleFormation());