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%2Fadmin%2FPolicyAdapter.java;h=339702297c89d47582fce7ee06e74825e3a14de6;hp=6aa40dacf352b53043b4baba9a62605a30180ad4;hb=dfd9c0a09c35e4b5b4b61be08b8424e4a3d0d500;hpb=ffd7241c7bfa8d8b68b504406fc6ed4cc299ffe6 diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyAdapter.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyAdapter.java index 6aa40dacf..339702297 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyAdapter.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyAdapter.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP Policy Engine * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. * Modified Copyright (C) 2018 Samsung Electronics Co., Ltd. * Modifications Copyright (C) 2019 Bell Canada * ================================================================================ @@ -22,6 +22,8 @@ package org.onap.policy.admin; +import com.att.research.xacml.util.XACMLProperties; + import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.controller.ActionPolicyController; @@ -37,8 +39,6 @@ import org.onap.policy.controller.DecisionPolicyController; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.jpa.PolicyEntity; -import com.att.research.xacml.util.XACMLProperties; - public class PolicyAdapter { private static final Logger LOGGER = FlexLogger.getLogger(PolicyAdapter.class); @@ -78,8 +78,8 @@ public class PolicyAdapter { configPolicyName = "Micro Service"; } else if (policyAdapter.getPolicyName().startsWith("Config_OOF")) { configPolicyName = "Optimization"; - } else if (policyAdapter.getPolicyName().startsWith("Action") || policyAdapter.getPolicyName() - .startsWith("Decision")) { + } else if (policyAdapter.getPolicyName().startsWith("Action") + || policyAdapter.getPolicyName().startsWith("Decision")) { // No configPolicyName is applicable } else { configPolicyName = "Base"; @@ -109,10 +109,11 @@ public class PolicyAdapter { public static PolicyAdapter getInstance() { try { - Class policyAdapter = Class - .forName(XACMLProperties.getProperty("policyAdapter.impl.className", PolicyAdapter.class.getName())); + Class policyAdapter = Class.forName( + XACMLProperties.getProperty("policyAdapter.impl.className", PolicyAdapter.class.getName())); return (PolicyAdapter) policyAdapter.newInstance(); - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException e) { + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException + | IllegalArgumentException e) { LOGGER.error("Exception Occurred" + e); } return null;