|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.semiramis.policyManager.util.opensaml.XACMLRequestUtils
public class XACMLRequestUtils
Utility methods to deal with openSAML XACML Requests
Constructor Summary | |
---|---|
XACMLRequestUtils()
|
Method Summary | |
---|---|
static org.opensaml.xacml.ctx.RequestType |
deserialize(java.io.InputStream requestStream)
Deserialize a XACML request from a stream |
static java.lang.String |
getAttributeFromAction(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId)
Get the first value of the attribute id from action attributes |
static org.opensaml.xacml.ctx.AttributeType |
getAttributeFromList(java.util.List<org.opensaml.xacml.ctx.AttributeType> attributes,
java.lang.String attributeId)
Return the AttributeType , if any, with the given attribute id,
null otherwise |
static java.lang.String |
getAttributeFromResource(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId)
Get the first value of the attribute id from resource attributes |
static java.lang.String |
getAttributeFromSubject(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId,
java.lang.String accessCategory)
Get the first attribute value for the attribute with given id in the access category indicated. |
static void |
setAttributeInAction(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId,
java.lang.String attributeValue)
set the attribute (id and value) in action. |
static void |
setAttributeInList(java.util.List<org.opensaml.xacml.ctx.AttributeType> attributes,
java.lang.String attributeID,
java.lang.String attributeValue)
|
static void |
setAttributeInResource(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId,
java.lang.String attributeValue)
set the attribute (id and value) in resource attributes. |
static void |
setAttributeInSubject(org.opensaml.xacml.ctx.RequestType request,
java.lang.String attributeId,
java.lang.String attributeValue,
java.lang.String subjectCategory)
Sets the attribute (id and value) in the access category indicated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XACMLRequestUtils()
Method Detail |
---|
public static org.opensaml.xacml.ctx.RequestType deserialize(java.io.InputStream requestStream) throws org.opensaml.xml.parse.XMLParserException, org.opensaml.xml.io.UnmarshallingException
requestStream
- the stream containing the XACML request
org.opensaml.xml.parse.XMLParserException
- if an exception occurs during parsing
org.opensaml.xml.io.UnmarshallingException
- if an exception occus during unmarshallingpublic static void setAttributeInSubject(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId, java.lang.String attributeValue, java.lang.String subjectCategory)
request
- the requestattributeId
- the attribute idattributeValue
- the attribute valuesubjectCategory
- the subject categorypublic static java.lang.String getAttributeFromSubject(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId, java.lang.String accessCategory)
request
- the requestattributeId
- the attribute idaccessCategory
- the access category
public static void setAttributeInAction(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId, java.lang.String attributeValue)
request
- the requestattributeId
- the attribute idattributeValue
- the attribute valuepublic static java.lang.String getAttributeFromAction(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId)
request
- the requestattributeId
- the attribute id
public static void setAttributeInResource(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId, java.lang.String attributeValue)
request
- the requestattributeId
- the attribute idattributeValue
- the attribute valuepublic static java.lang.String getAttributeFromResource(org.opensaml.xacml.ctx.RequestType request, java.lang.String attributeId)
request
- the requestattributeId
- the attribute id
public static void setAttributeInList(java.util.List<org.opensaml.xacml.ctx.AttributeType> attributes, java.lang.String attributeID, java.lang.String attributeValue)
public static org.opensaml.xacml.ctx.AttributeType getAttributeFromList(java.util.List<org.opensaml.xacml.ctx.AttributeType> attributes, java.lang.String attributeId)
AttributeType
, if any, with the given attribute id,
null otherwise
attributes
- the attributesattributeId
- the attribute id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |