Package org.ow2.authzforce.core.pdp.api
Class ImmutableDecisionRequest
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.ImmutableDecisionRequest
-
- All Implemented Interfaces:
DecisionRequest
public final class ImmutableDecisionRequest extends Object implements DecisionRequest
Immutable implementation ofDecisionRequest
to be used as input toPdpEngine.evaluate(DecisionRequest)
. Typically, it is used as output request instances by PDPDecisionRequestPreprocessor
extensions, based on JAXB/XACML input requests
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Instant
getCreationTimestamp()
Returns the request object creation timestamp.com.google.common.collect.ImmutableMap<String,net.sf.saxon.s9api.XdmNode>
getExtraContentsByCategory()
Get Attributes/Contents (parsed into XDM data model for XPath evaluation) by attribute categorystatic ImmutableDecisionRequest
getInstance(Map<AttributeFqn,AttributeBag<?>> namedAttributes, Map<String,net.sf.saxon.s9api.XdmNode> contentNodesByCategory, boolean returnApplicablePolicies)
Create new instance returning unsorted map of named attributes and content nodes by attribute categorycom.google.common.collect.ImmutableMap<AttributeFqn,AttributeBag<?>>
getNamedAttributes()
Get named attributes by namestatic ImmutableDecisionRequest
getSortedInstance(Map<AttributeFqn,AttributeBag<?>> namedAttributes, Map<String,net.sf.saxon.s9api.XdmNode> contentNodesByCategory, boolean returnApplicablePolicies)
Create new instance returning named attributes sorted by attribute name (getNamedAttributes()
), and content nodes sorted by attribute category name (getExtraContentsByCategory()
)int
hashCode()
boolean
isApplicablePolicyIdListReturned()
Get ReturnPolicyIdList flagString
toString()
-
-
-
Method Detail
-
getInstance
public static ImmutableDecisionRequest getInstance(Map<AttributeFqn,AttributeBag<?>> namedAttributes, Map<String,net.sf.saxon.s9api.XdmNode> contentNodesByCategory, boolean returnApplicablePolicies)
Create new instance returning unsorted map of named attributes and content nodes by attribute category- Parameters:
namedAttributes
- named Attributes (no extra Content element)contentNodesByCategory
- extra XML Content elements by attribute CategoryreturnApplicablePolicies
- return list of applicable policy identifiers; equivalent of XACML Request's ReturnPolicyIdList flag- Returns:
- new instance
-
getSortedInstance
public static ImmutableDecisionRequest getSortedInstance(Map<AttributeFqn,AttributeBag<?>> namedAttributes, Map<String,net.sf.saxon.s9api.XdmNode> contentNodesByCategory, boolean returnApplicablePolicies)
Create new instance returning named attributes sorted by attribute name (getNamedAttributes()
), and content nodes sorted by attribute category name (getExtraContentsByCategory()
)- Parameters:
namedAttributes
- named Attributes (no extra Content element)contentNodesByCategory
- extra XML Content elements by attribute CategoryreturnApplicablePolicies
- return list of applicable policy identifiers; equivalent of XACML Request's ReturnPolicyIdList flag- Returns:
- new instance
-
getCreationTimestamp
public Instant getCreationTimestamp()
Description copied from interface:DecisionRequest
Returns the request object creation timestamp. May be used to set one of XACML current-* attributes.- Specified by:
getCreationTimestamp
in interfaceDecisionRequest
- Returns:
- this object creation timestamp
-
getNamedAttributes
public com.google.common.collect.ImmutableMap<AttributeFqn,AttributeBag<?>> getNamedAttributes()
Description copied from interface:DecisionRequest
Get named attributes by name- Specified by:
getNamedAttributes
in interfaceDecisionRequest
- Returns:
- map of attribute name-value pairs, maybe empty - but NEVER NULL - if none (but
DecisionRequest.getExtraContentsByCategory()
result may not be empty)
-
getExtraContentsByCategory
public com.google.common.collect.ImmutableMap<String,net.sf.saxon.s9api.XdmNode> getExtraContentsByCategory()
Description copied from interface:DecisionRequest
Get Attributes/Contents (parsed into XDM data model for XPath evaluation) by attribute category- Specified by:
getExtraContentsByCategory
in interfaceDecisionRequest
- Returns:
- XML Content nodes by category, maybe empty - but NEVER NULL - if none (but
DecisionRequest.getNamedAttributes()
result may not be empty)
-
isApplicablePolicyIdListReturned
public boolean isApplicablePolicyIdListReturned()
Description copied from interface:DecisionRequest
Get ReturnPolicyIdList flag- Specified by:
isApplicablePolicyIdListReturned
in interfaceDecisionRequest
- Returns:
- the returnApplicablePolicyIdList
-
-