Class RequestImpl
java.lang.Object
com.sun.identity.xacml.context.impl.RequestImpl
- All Implemented Interfaces:
XmlSerializable,Request
The
Request element is the top-level element in the XACML
context schema. Its an abstraction layer used by the policy language.
It contains Subject, Resource, Action
and Environment elements.
<xs:complexType name="RequestType">
<xs:sequence>
<xs:element ref="xacml-context:Subject" maxOccurs="unbounded"/>
<xs:element ref="xacml-context:Resource" maxOccurs="unbounded"/>
<xs:element ref="xacml-context:Action"/>
<xs:element ref="xacml-context:Environment"/>
<xs:sequence>
<xs:complexType>
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorRequestImpl(String xml) This constructor is used to buildRequestobject from a XML string.RequestImpl(Element element) This constructor is used to buildRequestobject from a block of existing XML that has already been built into a DOM. -
Method Summary
Modifier and TypeMethodDescriptionReturns the instance ofActionelementReturns the instance ofEnvironmentelement.Returns the one to manyResourceelements of this objectReturns the one to manySubjectelements of this objectbooleanChecks if the object is mutablevoidMakes the object immutablevoidSets the instance ofActionvoidsetEnvironment(Environment argEnv) Sets the instance of theEnvironmentvoidsetResources(List resources) Sets the one to manyResourceelements of this objectvoidsetSubjects(List subjects) Sets the one to manySubjectelements of this objecttoDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) Serializes the element into an XMLDocumentFragment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.identity.xacml.context.Request
toXMLString, toXMLString
-
Constructor Details
-
RequestImpl
public RequestImpl()Default constructor -
RequestImpl
This constructor is used to buildRequestobject from a XML string.- Parameters:
xml- Ajava.lang.Stringrepresenting aRequestobject- Throws:
XACMLException- if it could not process the XML string
-
RequestImpl
This constructor is used to buildRequestobject from a block of existing XML that has already been built into a DOM.- Parameters:
element- Aorg.w3c.dom.Elementrepresenting DOM tree forRequestobject- Throws:
XACMLException- if it could not process the Element
-
-
Method Details
-
getSubjects
Returns the one to manySubjectelements of this object- Specified by:
getSubjectsin interfaceRequest- Returns:
- the
Subjectelements of this object
-
setSubjects
Sets the one to manySubjectelements of this object- Specified by:
setSubjectsin interfaceRequest- Parameters:
subjects- the one to manySubjectelements 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.
-
getResources
Returns the one to manyResourceelements of this object- Specified by:
getResourcesin interfaceRequest- Returns:
- the
Resourceelements of this object
-
setResources
Sets the one to manyResourceelements of this object- Specified by:
setResourcesin interfaceRequest- Parameters:
resources- the one to manyResourceelements 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.
-
getAction
Returns the instance ofActionelement -
setAction
Sets the instance ofAction- Specified by:
setActionin interfaceRequest- Parameters:
argAction- instance ofAction.- Throws:
XACMLException- if the object is immutable An object is consideredimmutableifmakeImmutable()has been invoked on it. It can be determined by callingisMutableon the object.
-
getEnvironment
Returns the instance ofEnvironmentelement.- Specified by:
getEnvironmentin interfaceRequest- Returns:
- the instance of
Environment.
-
setEnvironment
Sets the instance of theEnvironment- Specified by:
setEnvironmentin interfaceRequest- Parameters:
argEnv- instance ofEnvironment.- Throws:
XACMLException- if the object is immutable An object is consideredimmutableifmakeImmutable()has been invoked on it. It can be determined by callingisMutableon the object.
-
toDocumentFragment
public DocumentFragment toDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) throws com.sun.identity.saml2.common.SAML2Exception Description copied from interface:XmlSerializableSerializes the element into an XMLDocumentFragment. A default implementation is provided for compatibility with legacy code that implementsXmlSerializable.toXMLString(), but it is highly recommended to override this method.- Specified by:
toDocumentFragmentin interfaceXmlSerializable- Parameters:
document- the parentDocumentto create the document fragment from.includeNSPrefix- whether to include a namespace prefix in the document elements.declareNS- whether to declare any namespaces or assume that they are already declared.- Returns:
- the XML document fragment representing this SAML2 element.
- Throws:
com.sun.identity.saml2.common.SAML2Exception- if the element cannot be serialized for any reason.
-
makeImmutable
public void makeImmutable()Makes the object immutable- Specified by:
makeImmutablein interfaceRequest
-
isMutable
public boolean isMutable()Checks if the object is mutable
-