public class RequestImpl extends Object implements Request
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 and Description |
---|
RequestImpl()
Default constructor
|
RequestImpl(Element element)
This constructor is used to build
Request object from a
block of existing XML that has already been built into a DOM. |
RequestImpl(String xml)
This constructor is used to build
Request object from a
XML string. |
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Returns the instance of
Action element |
Environment |
getEnvironment()
Returns the instance of
Environment element. |
List |
getResources()
Returns the one to many
Resource elements of this object |
List |
getSubjects()
Returns the one to many
Subject elements of this object |
boolean |
isMutable()
Checks if the object is mutable
|
void |
makeImmutable()
Makes the object immutable
|
void |
setAction(Action argAction)
Sets the instance of
Action |
void |
setEnvironment(Environment argEnv)
Sets the instance of the
Environment |
void |
setResources(List resources)
Sets the one to many
Resource elements of this object |
void |
setSubjects(List subjects)
Sets the one to many
Subject elements of this object |
String |
toXMLString()
Returns a string representation of this object
|
String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a
String representation of this object |
public RequestImpl()
public RequestImpl(String xml) throws XACMLException
Request
object from a
XML string.xml
- A java.lang.String
representing
a Request
objectXACMLException
- if it could not process the XML stringpublic RequestImpl(Element element) throws XACMLException
Request
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 Request
objectXACML2Exception
- if it could not process the ElementXACMLException
public List getSubjects()
Subject
elements of this objectgetSubjects
in interface Request
Subject
elements of this objectpublic void setSubjects(List subjects) throws XACMLException
Subject
elements of this objectsetSubjects
in interface Request
subjects
- the one to many Subject
elements of this
objectXACMLException
- 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 List getResources()
Resource
elements of this objectgetResources
in interface Request
Resource
elements of this objectpublic void setResources(List resources) throws XACMLException
Resource
elements of this objectsetResources
in interface Request
resources
- the one to many Resource
elements of this
objectXACMLException
- 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 Action getAction()
Action
elementpublic void setAction(Action argAction) throws XACMLException
Action
setAction
in interface Request
argAction
- instance of Action
.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 Environment getEnvironment()
Environment
element.getEnvironment
in interface Request
Environment
.public void setEnvironment(Environment argEnv) throws XACMLException
Environment
setEnvironment
in interface Request
argEnv
- instance of Environment
.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(boolean includeNSPrefix, boolean declareNS) throws XACMLException
String
representation of this objecttoXMLString
in interface Request
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 reasonpublic String toXMLString() throws XACMLException
toXMLString
in interface Request
XACMLException
- if conversion fails for any reasonpublic void makeImmutable()
makeImmutable
in interface Request
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.