|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.semiramis.policyManager.util.opensaml.XACMLUtils
public class XACMLUtils
The XACMLUtils
class contains some utility method that helps in
building XACML objects.
Constructor Summary | |
---|---|
XACMLUtils()
|
Method Summary | ||
---|---|---|
static
|
create(java.lang.Class<T> cls,
javax.xml.namespace.QName qname)
Creates a new XMLObject from its Class object and
QName . |
|
static org.opensaml.xacml.ctx.ActionType |
createAction(org.opensaml.xacml.ctx.AttributeType... attributes)
Creates an ActionType object containing the given attributes |
|
static org.opensaml.xacml.ctx.AttributeType |
createAttribute(java.lang.String attributeId,
org.opensaml.xacml.ctx.AttributeValueType... values)
Creates an AttributeType object containing the given values |
|
static org.opensaml.xacml.ctx.AttributeValueType |
createAttributeValue(java.lang.String attributeValue)
Creates an AttributeValueType object with the given value |
|
static org.opensaml.xacml.ctx.ResourceType |
createResource(org.opensaml.xacml.ctx.AttributeType... attributes)
Creates a ResourceType object containing the given attributes |
|
static org.opensaml.xacml.ctx.SubjectType |
createSubject(org.opensaml.xacml.ctx.AttributeType... attributes)
Creates a SubjectType object containing the given attributes |
|
static
|
marshall(T xmlObject)
Marshal an XMLObject to a W3C DOM Element . |
|
static
|
printXMLObject(T xmlObject)
Marshall and print an extension of XMLObject to a String. |
|
static
|
unmarshall(org.w3c.dom.Document document)
Unmarshall an extension of a XMLObject from its Document
representation |
|
static
|
unmarshall(java.lang.String strXMLDocument)
Unmarshall an extension of a XMLObject from its String
representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XACMLUtils()
Method Detail |
---|
public static org.opensaml.xacml.ctx.SubjectType createSubject(org.opensaml.xacml.ctx.AttributeType... attributes)
SubjectType
object containing the given attributes
attributes
- the attributes to be added to the subject object
SubjectType
object createdpublic static org.opensaml.xacml.ctx.ResourceType createResource(org.opensaml.xacml.ctx.AttributeType... attributes)
ResourceType
object containing the given attributes
attributes
- the attributes to be added to the resource object
ResourceType
object createdpublic static org.opensaml.xacml.ctx.AttributeType createAttribute(java.lang.String attributeId, org.opensaml.xacml.ctx.AttributeValueType... values)
AttributeType
object containing the given values
attributeId
- the attribute idvalues
- the attribute values
AttributeType
object createdpublic static org.opensaml.xacml.ctx.AttributeValueType createAttributeValue(java.lang.String attributeValue)
AttributeValueType
object with the given value
attributeValue
- the attribute value
AttributeValueType
object createdpublic static org.opensaml.xacml.ctx.ActionType createAction(org.opensaml.xacml.ctx.AttributeType... attributes)
ActionType
object containing the given attributes
attributes
- the attributes to be added to the ActionType
object
ActionType
object createdpublic static <T extends org.opensaml.xml.XMLObject> T create(java.lang.Class<T> cls, javax.xml.namespace.QName qname)
XMLObject
from its Class
object and
QName
.
cls
- the Class
of the new XMLObject
qname
- the QName
of the new XMLObject
XMLObject
createdpublic static <T extends org.opensaml.xml.XMLObject> org.w3c.dom.Element marshall(T xmlObject) throws org.opensaml.xml.io.MarshallingException
Element
.
xmlObject
- the object extending XMLObject
to marshall
org.opensaml.xml.io.MarshallingException
- if the marshalling process failspublic static <T extends org.opensaml.xml.XMLObject> java.lang.String printXMLObject(T xmlObject) throws org.opensaml.xml.io.MarshallingException
XMLObject
to a String.
xmlObject
- the xml object extending XMLObject
org.opensaml.xml.io.MarshallingException
- if the marshalling process failspublic static <T extends org.opensaml.xml.XMLObject> T unmarshall(org.w3c.dom.Document document) throws org.opensaml.xml.io.UnmarshallingException
XMLObject
from its Document
representation
document
- the Document
to unmarshall
XMLObject
from the unmashalled Document
org.opensaml.xml.io.UnmarshallingException
- if the unmarshalling process failspublic static <T extends org.opensaml.xml.XMLObject> T unmarshall(java.lang.String strXMLDocument) throws org.opensaml.xml.parse.XMLParserException, org.opensaml.xml.io.UnmarshallingException
XMLObject
from its String
representation
strXMLDocument
- the String
containing the XML representation of the
XMLObject
to unmarshall
XMLObject
from the given String
org.opensaml.xml.parse.XMLParserException
- in case the XML string cannot be properly parsed to a
Document
org.opensaml.xml.io.UnmarshallingException
- if the unmarshalling process fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |