public class ContextUtil extends Object
| Constructor and Description |
|---|
ContextUtil() |
| Modifier and Type | Method and Description |
|---|---|
com.sun.xacml.ctx.RequestCtx |
buildRequest(List<Map<URI,List<com.sun.xacml.attr.AttributeValue>>> subjects,
Map<URI,com.sun.xacml.attr.AttributeValue> actions,
Map<URI,com.sun.xacml.attr.AttributeValue> resources,
Map<URI,com.sun.xacml.attr.AttributeValue> environment,
RelationshipResolver relationshipResolver)
Constructs a RequestCtx object.
|
String |
makeRequestCtx(com.sun.xacml.ctx.RequestCtx reqCtx)
Converts a RequestCtx object to its string representation.
|
com.sun.xacml.ctx.RequestCtx |
makeRequestCtx(String request)
Converts a string based request to a RequestCtx obejct.
|
String |
makeResponseCtx(com.sun.xacml.ctx.ResponseCtx resCtx)
Converst a ResponseCtx object to its string representation.
|
com.sun.xacml.ctx.ResponseCtx |
makeResponseCtx(String response)
Converts a string based response to a ResponseCtx obejct.
|
Map<String,com.sun.xacml.ctx.Result> |
makeResultMap(com.sun.xacml.ctx.ResponseCtx resCtx)
Returns a map of resource-id, result based on an XACML response.
|
void |
setActionMap(Map<String,String> actions) |
void |
setActionValueMap(Map<String,String> values) |
Set<com.sun.xacml.ctx.Attribute> |
setupAction(Map<URI,com.sun.xacml.attr.AttributeValue> a)
Creates an Action specifying the action-id, an optional attribute.
|
Set<com.sun.xacml.ctx.Attribute> |
setupEnvironment(Map<URI,com.sun.xacml.attr.AttributeValue> e)
Creates the Environment attributes.
|
Set<com.sun.xacml.ctx.Attribute> |
setupResources(Map<URI,com.sun.xacml.attr.AttributeValue> res,
RelationshipResolver relationshipResolver)
Creates a Resource specifying the resource-id, a required attribute.
|
Set<com.sun.xacml.ctx.Subject> |
setupSubjects(List<Map<URI,List<com.sun.xacml.attr.AttributeValue>>> subjs)
Sets up the Subject section of the request.
|
public Set<com.sun.xacml.ctx.Subject> setupSubjects(List<Map<URI,List<com.sun.xacml.attr.AttributeValue>>> subjs)
public Set<com.sun.xacml.ctx.Attribute> setupResources(Map<URI,com.sun.xacml.attr.AttributeValue> res, RelationshipResolver relationshipResolver) throws MelcoeXacmlException
MelcoeXacmlExceptionpublic Set<com.sun.xacml.ctx.Attribute> setupAction(Map<URI,com.sun.xacml.attr.AttributeValue> a)
public Set<com.sun.xacml.ctx.Attribute> setupEnvironment(Map<URI,com.sun.xacml.attr.AttributeValue> e)
public com.sun.xacml.ctx.RequestCtx buildRequest(List<Map<URI,List<com.sun.xacml.attr.AttributeValue>>> subjects, Map<URI,com.sun.xacml.attr.AttributeValue> actions, Map<URI,com.sun.xacml.attr.AttributeValue> resources, Map<URI,com.sun.xacml.attr.AttributeValue> environment, RelationshipResolver relationshipResolver) throws MelcoeXacmlException
subjects - list of Subjectsactions - list of Action attributesresources - list of resource Attributesenvironment - list of environment AttributesMelcoeXacmlExceptionpublic com.sun.xacml.ctx.ResponseCtx makeResponseCtx(String response) throws MelcoeXacmlException
response - the string responseMelcoeXacmlExceptionpublic com.sun.xacml.ctx.RequestCtx makeRequestCtx(String request) throws MelcoeXacmlException
request - the string requestMelcoeXacmlExceptionpublic String makeRequestCtx(com.sun.xacml.ctx.RequestCtx reqCtx)
reqCtx - the RequestCtx objectpublic String makeResponseCtx(com.sun.xacml.ctx.ResponseCtx resCtx)
resCtx - the ResponseCtx objectCopyright © 2013 DuraSpace. All Rights Reserved.