X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FCreateOptimizationController.java;h=37f543f353280189f9142c6610bd0f3d69050fff;hp=eb3b3246a3f00e9e131ccebb97f67a08bc38ef39;hb=779125e31adbcc59a9864843b523bd6ed2751cbb;hpb=1e61676b77dd09659027b8984f050df7e8538526 diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java index eb3b3246a..37f543f35 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java @@ -69,15 +69,15 @@ import org.json.JSONArray; import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; -import org.onap.policy.rest.XACMLRestProperties; +import org.onap.policy.rest.XacmlRestProperties; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.MicroserviceHeaderdeFaults; import org.onap.policy.rest.jpa.OptimizationModels; import org.onap.policy.rest.jpa.PolicyEntity; -import org.onap.policy.rest.util.MSAttributeObject; -import org.onap.policy.rest.util.MSModelUtils; -import org.onap.policy.rest.util.MSModelUtils.MODEL_TYPE; +import org.onap.policy.rest.util.MsAttributeObject; +import org.onap.policy.rest.util.MsModelUtils; +import org.onap.policy.rest.util.MsModelUtils.ModelType; import org.onap.policy.utils.PolicyUtils; import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.beans.factory.annotation.Autowired; @@ -103,7 +103,7 @@ public class CreateOptimizationController extends RestrictedBaseController { private String directory; private List modelList = new ArrayList<>(); private List dirDependencyList = new ArrayList<>(); - private LinkedHashMap classMap = new LinkedHashMap<>(); + private LinkedHashMap classMap = new LinkedHashMap<>(); String referenceAttributes; String attributeString; Set allManyTrueKeys = new HashSet<>(); @@ -668,7 +668,7 @@ public class CreateOptimizationController extends RestrictedBaseController { } List fileList = new ArrayList<>(); - MSModelUtils modelUtil = new MSModelUtils(); + MsModelUtils modelUtil = new MsModelUtils(); this.directory = MODEL; if (zip) { extractFolder(this.newFile); @@ -698,7 +698,7 @@ public class CreateOptimizationController extends RestrictedBaseController { modelType = "yml"; modelList.add(this.newModel.getModelName()); String className = this.newModel.getModelName(); - MSAttributeObject optimizationAttributes = new MSAttributeObject(); + MsAttributeObject optimizationAttributes = new MsAttributeObject(); optimizationAttributes.setClassName(className); LinkedHashMap returnAttributeList = new LinkedHashMap<>(); @@ -798,10 +798,10 @@ public class CreateOptimizationController extends RestrictedBaseController { private void retrieveDependency(String workingFile) { - MSModelUtils utils = new MSModelUtils(PolicyController.getMsOnapName(), PolicyController.getMsPolicyName()); - Map tempMap; + MsModelUtils utils = new MsModelUtils(PolicyController.getMsOnapName(), PolicyController.getMsPolicyName()); + Map tempMap; - tempMap = utils.processEpackage(workingFile, MODEL_TYPE.XMI); + tempMap = utils.processEpackage(workingFile, ModelType.XMI); classMap.putAll(tempMap); LOGGER.info(tempMap); @@ -823,7 +823,7 @@ public class CreateOptimizationController extends RestrictedBaseController { private List createList() { List list = new ArrayList<>(); - for (Entry entrySet : classMap.entrySet()) { + for (Entry entrySet : classMap.entrySet()) { if (entrySet.getValue().isPolicyTempalate()) { list.add(entrySet.getKey()); } @@ -850,7 +850,7 @@ public class CreateOptimizationController extends RestrictedBaseController { private OptimizationObject setOptimizationObjectValues(PolicyRestAdapter policyAdapter) { OptimizationObject optimizationObject = new OptimizationObject(); - optimizationObject.setTemplateVersion(XACMLProperties.getProperty(XACMLRestProperties.TemplateVersion_OOF)); + optimizationObject.setTemplateVersion(XACMLProperties.getProperty(XacmlRestProperties.TEMPLATE_VERSION_OOF)); if (policyAdapter.getServiceType() != null) { optimizationObject.setService(policyAdapter.getServiceType());