Class XACMLAuthzDecisionQueryImpl
- java.lang.Object
-
- com.sun.identity.saml2.protocol.impl.RequestAbstractImpl
-
- com.sun.identity.xacml.saml2.impl.XACMLAuthzDecisionQueryImpl
-
- All Implemented Interfaces:
RequestAbstract,XACMLAuthzDecisionQuery
public class XACMLAuthzDecisionQueryImpl extends RequestAbstractImpl implements XACMLAuthzDecisionQuery
TheXACMLAuthzDecisionQueryImplis an impelmentation ofXACMLAuthzDecisionQueryinterface. TheXACMLAuthzDecisionQueryelement is a SAML Query that extends SAML Protocol schema typeRequestAbstractType. 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 definedthat 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>
-
-
Field Summary
-
Fields inherited from class com.sun.identity.saml2.protocol.impl.RequestAbstractImpl
consent, destinationURI, elementName, extensions, isMutable, isSignatureValid, isSigned, issueInstant, nameID, publicKey, requestId, signatureString, signedXMLString, version
-
-
Constructor Summary
Constructors Constructor Description XACMLAuthzDecisionQueryImpl()Default constructorXACMLAuthzDecisionQueryImpl(String xml)This constructor is used to buildXACMLAuthzDecisionQueryobject from a XML string.XACMLAuthzDecisionQueryImpl(Element element)This constructor is used to buildXACMLAuthzDecisionQueryobject from a block of existing XML that has already been built into a DOM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetInputContextOnly()Returns the XML attribute boolean value which governs the source of information that the PDP is allowed to use in making an authorization decision.RequestgetRequest()Returns thexacml-context:Requestelement of this objectbooleangetReturnContext()Returns the XML attribute boolean value which provides means to PEP to request that anxacml-context>Requestelement be included in theXACMlAuthzdecisionStatementresulting from the request.voidmakeImmutable()Makes the object immutableprotected voidparseDOMElement(Element element)Parses the Docuemnt Element for this object.voidsetInputContextOnly(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.voidsetRequest(Request request)Sets thexacml-context:Requestelement of this objectvoidsetReturnContext(boolean returnContext)Sets the boolean value for this XML attributeStringtoXMLString()Returns a string representation of this objectStringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns aStringrepresentation of this objectprotected voidvalidateData()-
Methods inherited from class com.sun.identity.saml2.protocol.impl.RequestAbstractImpl
getAttributesString, getConsent, getDestination, getElements, getExtensions, getID, getIssueInstant, getIssuer, getSignature, getVersion, getXMLString, isMutable, isSignatureValid, isSigned, parseDOMAttributes, parseDOMChileElements, setConsent, setDestination, setExtensions, setID, setIssueInstant, setIssuer, setVersion, sign, validateID, validateIssueInstant, validateVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.saml2.protocol.RequestAbstract
getConsent, getDestination, getExtensions, getID, getIssueInstant, getIssuer, getSignature, getVersion, isSignatureValid, isSigned, setConsent, setDestination, setExtensions, setID, setIssueInstant, setIssuer, setVersion, sign
-
Methods inherited from interface com.sun.identity.xacml.saml2.XACMLAuthzDecisionQuery
isMutable
-
-
-
-
Constructor Detail
-
XACMLAuthzDecisionQueryImpl
public XACMLAuthzDecisionQueryImpl()
Default constructor
-
XACMLAuthzDecisionQueryImpl
public XACMLAuthzDecisionQueryImpl(Element element) throws SAML2Exception
This constructor is used to buildXACMLAuthzDecisionQueryobject from a block of existing XML that has already been built into a DOM.- Parameters:
element- Aorg.w3c.dom.Elementrepresenting DOM tree forXACMLAuthzDecisionQueryobject- Throws:
SAML2Exception- if it could not process the Element
-
XACMLAuthzDecisionQueryImpl
public XACMLAuthzDecisionQueryImpl(String xml) throws SAML2Exception
This constructor is used to buildXACMLAuthzDecisionQueryobject from a XML string.- Parameters:
xml- Ajava.lang.Stringrepresenting anXACMLAuthzDecisionQueryobject- Throws:
XACMLException- if it could not process the XML stringSAML2Exception
-
-
Method Detail
-
getInputContextOnly
public 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. If this attribute is "true" then it indiactes that the authorization decision has been made solely on the basis of information contained in theXACMLAuthzDecisionQuery; 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 theXACMLAuthzDecisionQuery.- Specified by:
getInputContextOnlyin interfaceXACMLAuthzDecisionQuery- Returns:
booleanindicating the value of this attribute.
-
setInputContextOnly
public void setInputContextOnly(boolean inputContextOnly) throws XACMLExceptionSets the XML attribute boolean value which governs the source of information that the PDP is allowed to use in making an authorization decision. If this attribute is "true" then it indicates to the PDP that the authorization decision has to be made solely on the basis of information contained in theXACMLAuthzDecisionQuery; 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 theXACMlAuthzDecisionQuery.- Specified by:
setInputContextOnlyin interfaceXACMLAuthzDecisionQuery- Parameters:
inputContextOnly-booleanindicating the value of this attribute.- Throws:
XACMLException- if the object is immutable An object is consideredimmutableifmakeImmutable()has been invoked on it. It can be determined by callingisMutableon the object.
-
getReturnContext
public boolean getReturnContext()
Returns the XML attribute boolean value which provides means to PEP to request that anxacml-context>Requestelement be included in theXACMlAuthzdecisionStatementresulting from the request. It also governs the contents of thatelement. If this attribite is "true" then the PDP SHALL include the xacml-context:Requestelement in theXACMLAuthzDecisionStatementelement in theXACMLResponse. Thexacml-context:RequestSHALL include all the attributes supplied by the PEP in theAuthzDecisionQuerywhich were used in making the authz decision. Other addtional attributes which may have been used by the PDP may be included. If this attribute is "false" then the PDP SHALL NOT include thexacml-context:Requestelement in theXACMLAuthzDecisionStatement.- Specified by:
getReturnContextin interfaceXACMLAuthzDecisionQuery- Returns:
booleanindicating the value of this attribute.
-
setReturnContext
public void setReturnContext(boolean returnContext) throws XACMLExceptionSets the boolean value for this XML attribute- Specified by:
setReturnContextin interfaceXACMLAuthzDecisionQuery- Parameters:
returnContext-booleanindicating the value of this attribute.- Throws:
XACMLException- if the object is immutable An object is consideredimmutableifmakeImmutable()has been invoked on it. It can be determined by callingisMutableon the object.- See Also:
getReturnContext()
-
getRequest
public Request getRequest()
Returns thexacml-context:Requestelement of this object- Specified by:
getRequestin interfaceXACMLAuthzDecisionQuery- Returns:
- the
xacml-context:Requestelements of this object
-
setRequest
public void setRequest(Request request) throws XACMLException
Sets thexacml-context:Requestelement of this object- Specified by:
setRequestin interfaceXACMLAuthzDecisionQuery- Parameters:
request- thexacml-context:Requestelement of this object.- Throws:
XACMLException- if the object is immutable An object is consideredimmutableifmakeImmutable()has been invoked on it. It can be determined by callingisMutableon the object.
-
toXMLString
public String toXMLString() throws XACMLException
Returns a string representation of this object- Specified by:
toXMLStringin interfaceRequestAbstract- Specified by:
toXMLStringin interfaceXACMLAuthzDecisionQuery- Overrides:
toXMLStringin classRequestAbstractImpl- Returns:
- a string representation of this object
- Throws:
XACMLException- if conversion fails for any reason
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
Returns aStringrepresentation of this object- Specified by:
toXMLStringin interfaceRequestAbstract- Specified by:
toXMLStringin interfaceXACMLAuthzDecisionQuery- Overrides:
toXMLStringin classRequestAbstractImpl- Parameters:
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.- Returns:
- a string representation of this object
- Throws:
XACMLException- if conversion fails for any reason
-
parseDOMElement
protected void parseDOMElement(Element element) throws SAML2Exception
Description copied from class:RequestAbstractImplParses the Docuemnt Element for this object.- Overrides:
parseDOMElementin classRequestAbstractImpl- Parameters:
element- the Document Element of this object.- Throws:
SAML2Exception- if error parsing the Document Element.
-
makeImmutable
public void makeImmutable()
Makes the object immutable- Specified by:
makeImmutablein interfaceRequestAbstract- Specified by:
makeImmutablein interfaceXACMLAuthzDecisionQuery- Overrides:
makeImmutablein classRequestAbstractImpl
-
validateData
protected void validateData() throws SAML2Exception- Overrides:
validateDatain classRequestAbstractImpl- Throws:
SAML2Exception
-
-