* ============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");
* you may not use this file except in compliance with the License.
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;
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;
import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.onap.policy.xacml.util.XACMLPolicyScanner;
-
-
public class HumanPolicyComponent {
private static final Logger LOGGER = FlexLogger.getLogger(HumanPolicyComponent.class);
public static final String EMPTY_STRING = "";
private static final String ENTER = "ENTER";
-
private static HtmlProcessor htmlProcessor;
private static File policyFile;
throw new IllegalArgumentException(msg);
}
- if (policyObject == null
- || (!(policyObject instanceof PolicySetType) && !(policyObject instanceof PolicyType))) {
+ if ((!(policyObject instanceof PolicySetType) && !(policyObject instanceof PolicyType))) {
String msg = "Invalid unmarshalled object: " + policyObject;
LOGGER.error(XACMLErrorConstants.ERROR_SCHEMA_INVALID + msg);
throw new IllegalArgumentException(msg);
String id = "-";
String version = "-";
-
if (policySet.getPolicyCombiningAlgId() != null)
combiningAlgorithm = extractLastIdentifier(policySet.getPolicyCombiningAlgId(), ":");
if (policySet.getVersion() != null)
version = policySet.getVersion();
-
htmlOut.println("<" + htmlListElement + "><b>Policy Set ID</b>: <i>" + id + "</i> (v" + version + ") " + "</"
+ htmlListElement + ">");
String id = "-";
String version = "-";
-
if (policy.getRuleCombiningAlgId() != null)
combiningAlgorithm = extractLastIdentifier(policy.getRuleCombiningAlgId(), ":");
}
}
-
@Override
public CallbackResult onPreVisitRule(PolicyType parent, RuleType rule) {
if (LOGGER.isTraceEnabled())