X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcomponents%2FHumanPolicyComponent.java;h=60029f8d7811be45898b289960952fce05b72e0f;hb=dfd9c0a09c35e4b5b4b61be08b8424e4a3d0d500;hp=b116af6ef1dda89d57f1551a12a6cd9fb92c6f1e;hpb=180257725caf46bdf7f5bb8e08d8390c255ac5d6;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java index b116af6ef..60029f8d7 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/components/HumanPolicyComponent.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP Policy Engine * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Bell Canada * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,7 +39,9 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; + import javax.xml.bind.JAXBElement; + import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressionType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressionsType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType; @@ -57,6 +59,7 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicySetType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.RuleType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.VariableReferenceType; + import org.apache.commons.io.FilenameUtils; import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; @@ -95,7 +98,6 @@ public class HumanPolicyComponent { public static final String EMPTY_STRING = ""; private static final String ENTER = "ENTER"; - private static HtmlProcessor htmlProcessor; private static File policyFile; @@ -357,7 +359,6 @@ class HtmlProcessor extends SimpleCallback { String id = "-"; String version = "-"; - if (policySet.getPolicyCombiningAlgId() != null) combiningAlgorithm = extractLastIdentifier(policySet.getPolicyCombiningAlgId(), ":"); @@ -367,7 +368,6 @@ class HtmlProcessor extends SimpleCallback { if (policySet.getVersion() != null) version = policySet.getVersion(); - htmlOut.println("<" + htmlListElement + ">Policy Set ID: " + id + " (v" + version + ") " + ""); @@ -441,7 +441,6 @@ class HtmlProcessor extends SimpleCallback { String id = "-"; String version = "-"; - if (policy.getRuleCombiningAlgId() != null) combiningAlgorithm = extractLastIdentifier(policy.getRuleCombiningAlgId(), ":"); @@ -477,7 +476,6 @@ class HtmlProcessor extends SimpleCallback { } } - @Override public CallbackResult onPreVisitRule(PolicyType parent, RuleType rule) { if (LOGGER.isTraceEnabled())