X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FCreatePolicyController.java;h=6cd121ee6da7270d0143dbd929166a5b18cedd20;hb=cac5ee759fee5db51a32838c7e25b878468a27e0;hp=71d0b3d0309ac3b887b1774cbe140f1e2559b812;hpb=b5caf28492a151d811dd3ce7e6ade26e56deade9;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java index 71d0b3d03..6cd121ee6 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java @@ -31,7 +31,7 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.jpa.PolicyEntity; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -101,24 +101,24 @@ public class CreatePolicyController extends RestrictedBaseController{ AttributeDesignatorType designator = match.getAttributeDesignator(); String attributeId = designator.getAttributeId(); // First match in the target is OnapName, so set that value. - if (attributeId.equals("ONAPName")) { + if ("ONAPName".equals(attributeId)) { policyAdapter.setOnapName(value); } - if (attributeId.equals("RiskType")){ + if ("RiskType".equals(attributeId)){ policyAdapter.setRiskType(value); } - if (attributeId.equals("RiskLevel")){ + if ("RiskLevel".equals(attributeId)){ policyAdapter.setRiskLevel(value); } - if (attributeId.equals("guard")){ + if ("guard".equals(attributeId)){ policyAdapter.setGuard(value); } - if (attributeId.equals("TTLDate") && !value.contains("NA")){ + if ("TTLDate".equals(attributeId) && !value.contains("NA")){ PolicyController controller = new PolicyController(); String newDate = controller.convertDate(value); policyAdapter.setTtlDate(newDate); } - if (attributeId.equals("ConfigName")){ + if ("ConfigName".equals(attributeId)){ policyAdapter.setConfigName(value); } // After Onap and Config it is optional to have attributes, so