|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.security.xacml.util.ContextUtil
public class ContextUtil
Utility class that provides various methods for creating/converting contexts. This class can convert requests and responses from their string representations to their object representations and vice versa as well as a few utility methods for getting information from the contexts. It also contains methods for constructing requests.
| Constructor Summary | |
|---|---|
ContextUtil()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextUtil()
| Method Detail |
|---|
public void setActionMap(Map<String,String> actions)
public void setActionValueMap(Map<String,String> values)
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 Attributes
MelcoeXacmlException
public com.sun.xacml.ctx.ResponseCtx makeResponseCtx(String response)
throws MelcoeXacmlException
response - the string response
MelcoeXacmlException
public com.sun.xacml.ctx.RequestCtx makeRequestCtx(String request)
throws MelcoeXacmlException
request - the string request
MelcoeXacmlExceptionpublic String makeRequestCtx(com.sun.xacml.ctx.RequestCtx reqCtx)
reqCtx - the RequestCtx object
public String makeResponseCtx(com.sun.xacml.ctx.ResponseCtx resCtx)
resCtx - the ResponseCtx object
public Map<String,com.sun.xacml.ctx.Result> makeResultMap(com.sun.xacml.ctx.ResponseCtx resCtx)
resCtx - the XACML response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||