public class XACMLAuthzDecisionQueryImpl extends RequestAbstractImpl implements XACMLAuthzDecisionQuery
XACMLAuthzDecisionQueryImpl
is an impelmentation
of XACMLAuthzDecisionQuery
interface.
The XACMLAuthzDecisionQuery
element is a SAML Query that
extends SAML Protocol schema type RequestAbstractType
.
It allows an XACML PEP to submit an XACML Request Context in a SAML
Query along with other information. This element is an alternative to
SAML defined
that allows an
XACML PEP to communicate with an XACML PDP using SAML2 protocol.
<xs:element name="XACMLAuthzDecisionQuery" type="XACMLAuthzDecisionQueryType"/> <xs:complexType name="XACMLAuthzDecisionQueryType"> <xs:complexContent> <xs:extension base="samlp:RequestAbstractType"> <xs:sequence> <xs:element ref="xacml-context:Request"/> <xs:sequence> <xs:attribute name="InputContextOnly" type="boolean" use="optional" default="false"/> <xs:attribute name="ReturnContext" type="boolean" use="optional" default="false"/> <xs:extension> <xs:complexContent> <xs:complexType>Schema for Base:
<complexType name="RequestAbstractType" abstract="true"> <sequence> <element ref="saml:Issuer" minOccurs="0"/> <element ref="ds:Signature" minOccurs="0"/> <element ref="samlp:Extensions" minOccurs="0"/> <sequence> <attribute name="ID" type="ID" use="required"/> <attribute name="Version" type="string" use="required"/> <attribute name="IssueInstant" type="dateTime" use="required"/> <attribute name="Destination" type="anyURI" use="optional"/> <attribute name="Consent" type="anyURI" use="optional"/> <complexType>
Constructor and Description |
---|
XACMLAuthzDecisionQueryImpl()
Default constructor
|
XACMLAuthzDecisionQueryImpl(Element element)
This constructor is used to build
XACMLAuthzDecisionQuery
object from a block of existing XML that has already been built into a
DOM. |
XACMLAuthzDecisionQueryImpl(String xml)
This constructor is used to build
XACMLAuthzDecisionQuery
object from a XML string. |
Modifier and Type | Method and Description |
---|---|
boolean |
getInputContextOnly()
Returns the XML attribute boolean value which governs the
source of information that the PDP is allowed to use in
making an authorization decision.
|
Request |
getRequest()
Returns the
xacml-context:Request element of this object |
boolean |
getReturnContext()
Returns the XML attribute boolean value which provides means
to PEP to request that an
xacml-context:Request
element be included in the XACMlAuthzdecisionStatement
resulting from the request. |
void |
makeImmutable()
Makes the object immutable
|
protected void |
parseDOMElement(Element element)
Parses the Docuemnt Element for this object.
|
void |
setInputContextOnly(boolean inputContextOnly)
Sets the XML attribute boolean value which governs the
source of information that the PDP is allowed to use in
making an authorization decision.
|
void |
setRequest(Request request)
Sets the
xacml-context:Request element of this object |
void |
setReturnContext(boolean returnContext)
Sets the boolean value for this XML attribute
|
String |
toXMLString()
Returns a string representation of this object
|
String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a
String representation of this object |
protected void |
validateData() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isMutable
getConsent, getDestination, getExtensions, getID, getIssueInstant, getIssuer, getSignature, getVersion, isSignatureValid, isSigned, setConsent, setDestination, setExtensions, setID, setIssueInstant, setIssuer, setVersion, sign
public XACMLAuthzDecisionQueryImpl()
public XACMLAuthzDecisionQueryImpl(Element element) throws SAML2Exception
XACMLAuthzDecisionQuery
object from a block of existing XML that has already been built into a
DOM.element
- A org.w3c.dom.Element
representing
DOM tree for XACMLAuthzDecisionQuery
objectSAML2Exception
- if it could not process the Elementpublic XACMLAuthzDecisionQueryImpl(String xml) throws SAML2Exception
XACMLAuthzDecisionQuery
object from a XML string.xml
- A java.lang.String
representing
an XACMLAuthzDecisionQuery
objectXACMLException
- if it could not process the XML stringSAML2Exception
public boolean getInputContextOnly()
XACMLAuthzDecisionQuery
; no external attributes have been
used. If this value is "false" then the decision may have been made
on the basis of external attributes not conatined in the
XACMLAuthzDecisionQuery
.getInputContextOnly
in interface XACMLAuthzDecisionQuery
boolean
indicating the value
of this attribute.public void setInputContextOnly(boolean inputContextOnly) throws XACMLException
XACMLAuthzDecisionQuery
; no external attributes may be
used. If this value is "false" then the decision can be made
on the basis of external attributes not conatined in the
XACMlAuthzDecisionQuery
.setInputContextOnly
in interface XACMLAuthzDecisionQuery
inputContextOnly
- boolean
indicating the value
of this attribute.XACMLException
- if the object is immutable
An object is considered immutable
if
makeImmutable()
has been invoked on it. It can
be determined by calling isMutable
on the object.public boolean getReturnContext()
xacml-context:Request
element be included in the XACMlAuthzdecisionStatement
resulting from the request. It also governs the contents of that
Request
element. If this attribute is "true" then the
PDP SHALL include the xacml-context:Request
element in the
XACMLAuthzDecisionStatement
element in the
XACMLResponse
.
The xacml-context:Request
SHALL include all the attributes
supplied by the PEP in the AuthzDecisionQuery
which were
used in making the authz decision. Other additional attributes which may
have been used by the PDP may be included.
If this attribute is "false" then the PDP SHALL NOT include the
xacml-context:Request
element in the
XACMLAuthzDecisionStatement
.getReturnContext
in interface XACMLAuthzDecisionQuery
boolean
indicating the value
of this attribute.public void setReturnContext(boolean returnContext) throws XACMLException
setReturnContext
in interface XACMLAuthzDecisionQuery
returnContext
- boolean
indicating the value
of this attribute.XACMLException
- if the object is immutable
An object is considered immutable
if
makeImmutable()
has been invoked on it. It can
be determined by calling isMutable
on the object.XACMLAuthzDecisionQueryImpl.getReturnContext()
public Request getRequest()
xacml-context:Request
element of this objectgetRequest
in interface XACMLAuthzDecisionQuery
xacml-context:Request
elements of this objectpublic void setRequest(Request request) throws XACMLException
xacml-context:Request
element of this objectsetRequest
in interface XACMLAuthzDecisionQuery
request
- the xacml-context:Request
element of this
object.XACMLException
- if the object is immutable
An object is considered immutable
if
makeImmutable()
has been invoked on it. It can
be determined by calling isMutable
on the object.public String toXMLString() throws XACMLException
toXMLString
in interface RequestAbstract
toXMLString
in interface XACMLAuthzDecisionQuery
toXMLString
in class RequestAbstractImpl
XACMLException
- if conversion fails for any reasonpublic String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
String
representation of this objecttoXMLString
in interface RequestAbstract
toXMLString
in interface XACMLAuthzDecisionQuery
toXMLString
in class RequestAbstractImpl
includeNSPrefix
- Determines whether or not the namespace qualifier
is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared
within the Element.XACMLException
- if conversion fails for any reasonprotected void parseDOMElement(Element element) throws SAML2Exception
RequestAbstractImpl
parseDOMElement
in class RequestAbstractImpl
element
- the Document Element of this object.SAML2Exception
- if error parsing the Document Element.public void makeImmutable()
makeImmutable
in interface RequestAbstract
makeImmutable
in interface XACMLAuthzDecisionQuery
makeImmutable
in class RequestAbstractImpl
protected void validateData() throws SAML2Exception
validateData
in class RequestAbstractImpl
SAML2Exception
Copyright © 2010-2018, ForgeRock All Rights Reserved.