Commit c6de2f82 authored by Romain Ferrari's avatar Romain Ferrari
Browse files

Merge branch 'release/3.5.2'

parents b05d48b5 eeaf81ff
/target
/.classpath
/.project
/bin
/.settings
/.settings/org.eclipse.jdt.core.prefs
/.settings/org.eclipse.core.resources.prefs
/.settings/org.eclipse.wst.common.component
/.settings/org.eclipse.wst.common.project.facet.core.xml
/.settings/org.sonar.ide.eclipse.core.prefs
*.log
/target
/.classpath
/.project
/bin
/.settings
/.settings/org.eclipse.jdt.core.prefs
/.settings/org.eclipse.core.resources.prefs
/.settings/org.eclipse.wst.common.component
/.settings/org.eclipse.wst.common.project.facet.core.xml
/.settings/org.sonar.ide.eclipse.core.prefs
*.log
-------------------------
AuthZForce CORE - Release Notes
-------------------------
-------------------
-- Version 3.4.2 --
-------------------
Fixing bug on Rule Algorithm:
- DenyUnlessPermitRuleAlg.java
- PermitUnlessDenyRuleAlg.java.
=> A cast was misplaced and an error occured on the combination of rules
-------------------
-- Version 3.4.0 --
-------------------
Implementation working with XACML 3.0 requests and policies. Based on OASIS model (xsd)
Artifact name refactored => authzforce-core-authzforce in order to be more clear in the Nexus repository
Partial implementation of the Multi Decision Request. The Multi Request is not implemented yet
Functionnal tests added for XACML 3.0 model. This is actually the OASIS functionnal tests translated to a v3.O model
BasicV3 => OK
BasicFunctionV3 => OK
ConformanceV3 => OK
Implementation of the "Include in result" attribute
Full support of obligations
Full support of advices
Apache 2.0 licence headers added to every source file
Audit log based on annotations for Rule and Policies.
Use @Audit(type = [RULE || POLICY]) over a method returning a result. You can also use @Audit(type = DISPLAY) to display and clear the logs.
Non exhaustif list of improvement and implementation
Combining algorithm
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny
Functions
OK urn:oasis:names:tc:xacml:3.0:function:string-starts-with
OK urn:oasis:names:tc:xacml:3.0:function:string-ends-with
OK urn:oasis:names:tc:xacml:3.0:function:string-contains
OK urn:oasis:names:tc:xacml:3.0:function:string-substring
-------------------
-- Version 2.1.4 --
-------------------
Stable version working with XACML 2.0
-------------------------
AuthZForce CORE version @version- Release Notes
-------------------------
-------------------
-- Version @version
-------------------
-------------------
-- Version 3.5.2-SNAPSHOT
-------------------
Bug fixed when there were more than one AnyOf and AllOf.
Only the Match element was evaluated with the "match(context)" function
Unitary tests were added to complete and prevent that for happening again
-------------------
-- Version 3.4.2
-------------------
Fixing bug on Rule Algorithm:
- DenyUnlessPermitRuleAlg.java
- PermitUnlessDenyRuleAlg.java.
=> A cast was misplaced and an error occured on the combination of rules
-------------------
-- Version 3.4.0
-------------------
Implementation working with XACML 3.0 requests and policies. Based on OASIS model (xsd)
Artifact name refactored => authzforce-core-authzforce in order to be more clear in the Nexus repository
Partial implementation of the Multi Decision Request. The Multi Request is not implemented yet
Functionnal tests added for XACML 3.0 model. This is actually the OASIS functionnal tests translated to a v3.O model
BasicV3 => OK
BasicFunctionV3 => OK
ConformanceV3 => OK
Implementation of the "Include in result" attribute
Full support of obligations
Full support of advices
Apache 2.0 licence headers added to every source file
Audit log based on annotations for Rule and Policies.
Use @Audit(type = [RULE || POLICY]) over a method returning a result. You can also use @Audit(type = DISPLAY) to display and clear the logs.
Non exhaustif list of improvement and implementation
Combining algorithm
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit
OK urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny
OK urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny
Functions
OK urn:oasis:names:tc:xacml:3.0:function:string-starts-with
OK urn:oasis:names:tc:xacml:3.0:function:string-ends-with
OK urn:oasis:names:tc:xacml:3.0:function:string-contains
OK urn:oasis:names:tc:xacml:3.0:function:string-substring
-------------------
-- Version 2.1.4
-------------------
Stable version working with XACML 2.0
This diff is collapsed.
......@@ -41,17 +41,15 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressionsType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionsType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressions;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
......@@ -62,7 +60,6 @@ import com.sun.xacml.combine.CombiningAlgFactory;
import com.sun.xacml.combine.CombiningAlgorithm;
import com.sun.xacml.combine.PolicyCombiningAlgorithm;
import com.sun.xacml.combine.RuleCombiningAlgorithm;
import com.sun.xacml.ctx.Result;
import com.sun.xacml.xacmlv3.Target;
/**
......@@ -72,7 +69,7 @@ import com.sun.xacml.xacmlv3.Target;
* @author Seth Proctor
* @author Marco Barreno
*/
public abstract class AbstractPolicy extends PolicyType {
public abstract class AbstractPolicy extends oasis.names.tc.xacml._3_0.core.schema.wd_17.Policy {
// atributes associated with this policy
private CombiningAlgorithm combiningAlg;
......@@ -89,11 +86,7 @@ public abstract class AbstractPolicy extends PolicyType {
// ...or the CombinerElements that are passed to combining algorithms
private List childElements;
/**
* Logger used for all classes
*/
private static final org.apache.log4j.Logger LOGGER = org.apache.log4j.Logger
.getLogger(AbstractPolicy.class);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPolicy.class);
/**
* Constructor used by <code>PolicyReference</code>, which supplies its own
......@@ -120,7 +113,7 @@ public abstract class AbstractPolicy extends PolicyType {
*/
protected AbstractPolicy(URI id, String version,
CombiningAlgorithm combiningAlg, String description,
TargetType target) {
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target) {
this(id, version, combiningAlg, description, target, null);
}
......@@ -143,7 +136,7 @@ public abstract class AbstractPolicy extends PolicyType {
*/
protected AbstractPolicy(URI id, String version,
CombiningAlgorithm combiningAlg, String description,
TargetType target, String defaultVersion) {
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target, String defaultVersion) {
this(id, version, combiningAlg, description, target, defaultVersion,
null, null);
}
......@@ -169,7 +162,7 @@ public abstract class AbstractPolicy extends PolicyType {
*/
protected AbstractPolicy(URI id, String version,
CombiningAlgorithm combiningAlg, String description,
TargetType target, String defaultVersion, Set obligations,
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target, String defaultVersion, Set obligations,
List parameters) {
this.policyId = id.toASCIIString();
this.combiningAlg = combiningAlg;
......@@ -187,17 +180,17 @@ public abstract class AbstractPolicy extends PolicyType {
metaData = null;
if (obligations == null) {
this.obligationExpressions = new ObligationExpressionsType();
this.obligationExpressions = new ObligationExpressions();
} else {
ObligationExpressionsType oblExpr = new ObligationExpressionsType();
oblExpr.getObligationExpression().addAll(obligations);
ObligationExpressions oblExpr = new ObligationExpressions();
oblExpr.getObligationExpressions().addAll(obligations);
this.obligationExpressions = oblExpr;
}
if (parameters == null) {
this.combinerParametersOrRuleCombinerParametersOrVariableDefinition = Collections.EMPTY_LIST;
this.combinerParametersAndRuleCombinerParametersAndVariableDefinitions = Collections.EMPTY_LIST;
} else {
this.combinerParametersOrRuleCombinerParametersOrVariableDefinition = Collections.unmodifiableList(new ArrayList(
this.combinerParametersAndRuleCombinerParametersAndVariableDefinitions = Collections.unmodifiableList(new ArrayList(
parameters));
}
}
......@@ -276,9 +269,9 @@ public abstract class AbstractPolicy extends PolicyType {
metaData = new PolicyMetaData(root.getNamespaceURI(), defaultVersion);
// now read the remaining policy elements
obligationExpressions = new ObligationExpressionsType();
this.combinerParametersOrRuleCombinerParametersOrVariableDefinition = new ArrayList();
adviceExpressions = new AdviceExpressionsType();
obligationExpressions = new ObligationExpressions();
this.combinerParametersAndRuleCombinerParametersAndVariableDefinitions = new ArrayList();
adviceExpressions = new AdviceExpressions();
_children = root.getChildNodes();
for (int i = 0; i < _children.getLength(); i++) {
......@@ -293,7 +286,7 @@ public abstract class AbstractPolicy extends PolicyType {
} else if (cname.equals("Obligations")) {
parseObligations(child);
} else if (cname.equals("CombinerParameters")) {
this.combinerParametersOrRuleCombinerParametersOrVariableDefinition = handleParameters(child);
this.combinerParametersAndRuleCombinerParametersAndVariableDefinitions = handleParameters(child);
} else if (cname.equals("ObligationExpressions")) {
parseObligations(child);
} else if (cname.equals("AdviceExpressions")) {
......@@ -311,18 +304,16 @@ public abstract class AbstractPolicy extends PolicyType {
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if (node.getNodeName().equals("ObligationExpression")) {
JAXBElement<ObligationExpressionsType> match = null;
JAXBElement<ObligationExpressions> match = null;
try {
JAXBContext jc = JAXBContext
.newInstance("oasis.names.tc.xacml._3_0.core.schema.wd_17");
Unmarshaller u = jc.createUnmarshaller();
match = (JAXBElement<ObligationExpressionsType>) u
.unmarshal(root);
Unmarshaller u = BindingUtility.XACML3_0_JAXB_CONTEXT.createUnmarshaller();
match = u.unmarshal(root, ObligationExpressions.class);
obligationExpressions = match.getValue();
} catch (Exception e) {
System.err.println(e);
LOGGER.error("Error unmarshalling ObligationExpressions", e);
}
obligationExpressions= match.getValue();
break;
}
}
}
......@@ -335,18 +326,16 @@ public abstract class AbstractPolicy extends PolicyType {
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if (node.getNodeName().equals("AdviceExpressions")) {
JAXBElement<AdviceExpressionsType> match = null;
final JAXBElement<AdviceExpressions> match;
try {
JAXBContext jc = JAXBContext
.newInstance("oasis.names.tc.xacml._3_0.core.schema.wd_17");
Unmarshaller u = jc.createUnmarshaller();
match = (JAXBElement<AdviceExpressionsType>) u
.unmarshal(root);
Unmarshaller u = BindingUtility.XACML3_0_JAXB_CONTEXT.createUnmarshaller();
match = u.unmarshal(root, AdviceExpressions.class);
adviceExpressions = match.getValue();
} catch (Exception e) {
LOGGER.error(e);
LOGGER.error("Error unmarshalling AdviceExpressions", e);
}
adviceExpressions = match.getValue();
break;
}
}
}
......@@ -423,7 +412,7 @@ public abstract class AbstractPolicy extends PolicyType {
* @return a <code>List</code> of <code>CombinerParameter</code>s
*/
public List getCombiningParameters() {
return this.combinerParametersOrRuleCombinerParametersOrVariableDefinition;
return this.combinerParametersAndRuleCombinerParametersAndVariableDefinitions;
}
/**
......@@ -441,7 +430,7 @@ public abstract class AbstractPolicy extends PolicyType {
*
* @return the policy's target
*/
public TargetType getTarget() {
public oasis.names.tc.xacml._3_0.core.schema.wd_17.Target getTarget() {
return target;
}
......@@ -482,7 +471,7 @@ public abstract class AbstractPolicy extends PolicyType {
*
* @return the policy's obligations
*/
public ObligationExpressionsType getObligations() {
public ObligationExpressions getObligations() {
return obligationExpressions;
}
......@@ -624,14 +613,14 @@ public abstract class AbstractPolicy extends PolicyType {
((CombinerElement) (it.next())).encode(output, indenter);
}
if (obligationExpressions.getObligationExpression().size() != 0) {
if (obligationExpressions != null && !obligationExpressions.getObligationExpressions().isEmpty()) {
PrintStream out = new PrintStream(output);
String indent = indenter.makeString();
out.println(indent + "<Obligations>");
indenter.in();
it = obligationExpressions.getObligationExpression().iterator();
it = obligationExpressions.getObligationExpressions().iterator();
while (it.hasNext()) {
((Obligation) (it.next())).encode(output, indenter);
}
......@@ -639,6 +628,22 @@ public abstract class AbstractPolicy extends PolicyType {
out.println(indent + "</Obligations>");
indenter.out();
}
if (adviceExpressions != null && !adviceExpressions.getAdviceExpressions().isEmpty()) {
PrintStream out = new PrintStream(output);
String indent = indenter.makeString();
out.println(indent + "<AssociateAdvice>");
indenter.in();
it = adviceExpressions.getAdviceExpressions().iterator();
while (it.hasNext()) {
((Obligation) (it.next())).encode(output, indenter);
}
out.println(indent + "</AssociateAdvice>");
indenter.out();
}
}
@Override
......
......@@ -40,25 +40,21 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
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.AdviceType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpressionType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.Advice;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpression;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AssociatedAdvice;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignment;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpression;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.CombinerParametersType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.DecisionType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionsType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyCombinerParametersType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicySetType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpression;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
......@@ -71,9 +67,8 @@ import com.sun.xacml.combine.PolicyCombinerElement;
import com.sun.xacml.combine.PolicyCombiningAlgorithm;
import com.sun.xacml.ctx.Result;
import com.sun.xacml.xacmlv3.AdviceExpressions;
import com.sun.xacml.xacmlv3.Policy;
import com.sun.xacml.xacmlv3.IPolicy;
import com.sun.xacml.xacmlv3.Target;
import com.thalesgroup.authzforce.xacml.schema.XACMLAttributeId;
/**
* Represents an instance of an XACML policy.
......@@ -82,8 +77,8 @@ import com.thalesgroup.authzforce.xacml.schema.XACMLAttributeId;
* @author Seth Proctor
* @author Marco Barreno
*/
public abstract class AbstractPolicySet extends PolicySetType {
public abstract class AbstractPolicySet extends oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicySet implements IPolicy {
// atributes associated with this policy
// private URI idAttr;
// private String version;
......@@ -115,8 +110,8 @@ public abstract class AbstractPolicySet extends PolicySetType {
// private List parameters;
// the logger we'll use for all messages
private static final Logger logger = Logger
.getLogger(AbstractPolicySet.class.getName());
private static final Logger LOGGER = LoggerFactory
.getLogger(AbstractPolicySet.class);
/**
* Constructor used by <code>PolicyReference</code>, which supplies its own
......@@ -143,7 +138,7 @@ public abstract class AbstractPolicySet extends PolicySetType {
*/
protected AbstractPolicySet(URI id, String version,
PolicyCombiningAlgorithm combiningAlg, String description,
TargetType target) {
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target) {
this(id, version, combiningAlg, description, target, null);
}
......@@ -166,7 +161,7 @@ public abstract class AbstractPolicySet extends PolicySetType {
*/
protected AbstractPolicySet(URI id, String version,
PolicyCombiningAlgorithm combiningAlg, String description,
TargetType target, String defaultVersion) {
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target, String defaultVersion) {
this(id, version, combiningAlg, description, target, defaultVersion,
null, null, null);
}
......@@ -192,9 +187,9 @@ public abstract class AbstractPolicySet extends PolicySetType {
*/
protected AbstractPolicySet(URI id, String version,
PolicyCombiningAlgorithm combiningAlg, String description,
TargetType target, String defaultVersion,
ObligationExpressionsType obligations,
AdviceExpressionsType advices, List parameters) {
oasis.names.tc.xacml._3_0.core.schema.wd_17.Target target, String defaultVersion,
oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressions obligations,
oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressions advices, List parameters) {
this.policySetId = id.toASCIIString();
this.combiningAlg = combiningAlg;
this.description = description;
......@@ -207,25 +202,34 @@ public abstract class AbstractPolicySet extends PolicySetType {
this.version = version;
}
// FIXME: this needs to fill in the meta-data correctly
metaData = null;
metaData = new PolicyMetaData(PolicyMetaData.XACML_3_0_IDENTIFIER, defaultVersion);
if (obligations == null) {
this.obligationExpressions = new ObligationExpressionsType();
/*
* obligationExpressions must be null by default, if you create new
* ObligationExpressions() in this case, the result Obligations will be marshalled to
* empty <Obligations /> element which is NOT VALID against the XACML schema.
*/
this.obligationExpressions = null;
} else {
this.obligationExpressions = obligations;
}
if (advices == null) {
this.adviceExpressions = new AdviceExpressionsType();
/*
* adviceExpressions must be null by default, if you create new
* AdviceExpressions() in this case, the result AssociatedAdvice will be marshalled to
* empty <AssociatedAdvice /> element which is NOT VALID against the XACML schema.
*/
this.adviceExpressions = null;
} else {
this.adviceExpressions = advices;
}
if (parameters == null) {
this.policySetOrPolicyOrPolicySetIdReference = Collections.EMPTY_LIST;
this.policySetsAndPoliciesAndPolicySetIdReferences = Collections.EMPTY_LIST;
} else {
this.policySetOrPolicyOrPolicySetIdReference = Collections
this.policySetsAndPoliciesAndPolicySetIdReferences = Collections
.unmodifiableList(new ArrayList(parameters));
}
}
......@@ -284,7 +288,7 @@ public abstract class AbstractPolicySet extends PolicySetType {
// ...and make sure it's the right kind
if (policyPrefix.equals("PolicySet")) {
if (!(combiningAlg instanceof PolicyCombiningAlgorithm))
throw new ParsingException("PolicySet must use a Policy "
throw new ParsingException("PolicySet (id=" + this.policySetId + ") must use a Policy "
+ "Combining Algorithm");
}
......@@ -302,9 +306,19 @@ public abstract class AbstractPolicySet extends PolicySetType {
metaData = new PolicyMetaData(root.getNamespaceURI(), defaultVersion);
// now read the remaining policy elements
obligationExpressions = new ObligationExpressionsType();
this.policySetOrPolicyOrPolicySetIdReference = new ArrayList();
adviceExpressions = new AdviceExpressionsType();
/*
* obligationExpressions must be null by default, if you create new
* ObligationExpressions() in this case, the result Obligations will be marshalled to
* empty <Obligations /> element which is NOT VALID against the XACML schema.
*/
obligationExpressions = null;
this.policySetsAndPoliciesAndPolicySetIdReferences = new ArrayList();
/*
* obligationExpressions must be null by default, if you create new
* AdviceExpressions() in this case, the result AssociatedAdvice will be marshalled to
* empty <AssociatedAdvice /> element which is NOT VALID against the XACML schema.
*/
adviceExpressions = null;
_children = root.getChildNodes();
List myPolicies = new ArrayList();
......@@ -320,7 +334,7 @@ public abstract class AbstractPolicySet extends PolicySetType {
} else if (cname.equals("Obligations")) {
parseObligations(child);
} else if (cname.equals("CombinerParameters")) {
this.policySetOrPolicyOrPolicySetIdReference = handleParameters(child);
this.policySetsAndPoliciesAndPolicySetIdReferences = handleParameters(child);
} else if (cname.equals("ObligationExpressions")) {
// parseObligations(child);
this.obligationExpressions = ObligationExpressions.getInstance(child);
......@@ -355,18 +369,16 @@ public abstract class AbstractPolicySet extends PolicySetType {
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if (node.getNodeName().equals("ObligationExpression")) {
JAXBElement<ObligationExpressionsType> match = null;
JAXBElement<oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressions> match = null;
try {
JAXBContext jc = JAXBContext
.newInstance("oasis.names.tc.xacml._3_0.core.schema.wd_17");
Unmarshaller u = jc.createUnmarshaller();
match = (JAXBElement<ObligationExpressionsType>) u
.unmarshal(root);
Unmarshaller u = BindingUtility.XACML3_0_JAXB_CONTEXT.createUnmarshaller();
match = u.unmarshal(root, oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressions.class);
obligationExpressions = match.getValue();
} catch (Exception e) {
System.err.println(e);
LOGGER.error("Error unmarshalling ObligationExpressions", e);
}
obligationExpressions = match.getValue();
break;
}
}
}
......@@ -379,18 +391,16 @@ public abstract class AbstractPolicySet extends PolicySetType {
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if (node.getNodeName().equals("AdviceExpressions")) {
JAXBElement<AdviceExpressionsType> match = null;
JAXBElement<oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressions> match = null;
try {
JAXBContext jc = JAXBContext
.newInstance("oasis.names.tc.xacml._3_0.core.schema.wd_17");
Unmarshaller u = jc.createUnmarshaller();
match = (JAXBElement<AdviceExpressionsType>) u
.unmarshal(root);
Unmarshaller u = BindingUtility.XACML3_0_JAXB_CONTEXT.createUnmarshaller();
match = u.unmarshal(root, oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressions.class);
adviceExpressions = match.getValue();
} catch (Exception e) {
System.err.println(e);
LOGGER.error("Error unmarshalling AdviceExpressions", e);
}
adviceExpressions = match.getValue();
break;
}
}
}
......@@ -451,11 +461,7 @@ public abstract class AbstractPolicySet extends PolicySetType {
return version;
}
/**
* Returns the combining algorithm used by this policy
*
* @return the combining algorithm
*/
@Override
public CombiningAlgorithm getCombiningAlg() {
return combiningAlg;
}
......@@ -467,7 +473,7 @@ public abstract class AbstractPolicySet extends PolicySetType {