org.glite.authz.pep.obligation.eesmap
Class XACMLConverter

java.lang.Object
  extended by org.glite.authz.pep.obligation.eesmap.XACMLConverter

public class XACMLConverter
extends java.lang.Object

A helper class for converting to/from XACML objects. NOTE the OpenSAML library must already be bootstrapped before any method in this helper class is invoked.


Constructor Summary
XACMLConverter()
           
 
Method Summary
static org.glite.authz.common.model.Action actionFromXACML(org.opensaml.xacml.ctx.ActionType xacmlAction)
          Converts a XACML ActionType to a simple model Action.
static org.opensaml.xacml.ctx.ActionType actionToXACML(org.glite.authz.common.model.Action action)
          Converts a Action to a XACML ActionType.
static org.glite.authz.common.model.Attribute attributeFromXACML(org.opensaml.xacml.ctx.AttributeType xacmlAttribute)
          Converts a XACML AttributeType to a simple model Attribute.
static org.opensaml.xacml.ctx.AttributeType attributeToXACML(org.glite.authz.common.model.Attribute attribute)
          Converts a Attribute to a XACML AttributeType.
static org.glite.authz.common.model.Environment environmentFromXACML(org.opensaml.xacml.ctx.EnvironmentType xacmlEnvironment)
          Converts a XACML EnvironmentType to a simple model Environment.
static org.opensaml.xacml.ctx.EnvironmentType environmentToXACML(org.glite.authz.common.model.Environment environment)
          Converts a Environment to a XACML EnvironmentType.
static org.glite.authz.common.model.Obligation obligationFromXACML(org.opensaml.xacml.policy.ObligationType xacmlObligation)
          Converts a XACML ObligationType to a simple model Obligation.
static org.opensaml.xacml.policy.ObligationType obligationToXACML(org.glite.authz.common.model.Obligation obligation)
          Converts a simple model Obligation in to a XACML ObligationType.
static org.glite.authz.common.model.Request requestFromXACML(org.opensaml.xacml.ctx.RequestType xacmlRequest)
          Converts a XACML RequestType to a simple model Request.
static org.opensaml.xacml.ctx.RequestType requestToXACML(org.glite.authz.common.model.Request request)
          Converts a Request to a XACML RequestType.
static org.glite.authz.common.model.Resource resourceFromXACML(org.opensaml.xacml.ctx.ResourceType xacmlResource)
          Converts a XACML ResourceType to a simple model Resource.
static org.opensaml.xacml.ctx.ResourceType resourceToXACML(org.glite.authz.common.model.Resource resource)
          Converts a Resource to a XACML ResourceType.
static org.glite.authz.common.model.Response responseFromXACML(org.opensaml.xacml.ctx.ResponseType xacmlResponse, org.opensaml.xacml.ctx.RequestType xacmlRequest)
          Converts a XACML ResponseType to a simple model Response.
static org.opensaml.xacml.ctx.ResponseType responseToXACML(org.glite.authz.common.model.Response response)
          Converts a Response to a XACML ResponseType.
static org.glite.authz.common.model.Result resultFromXACML(org.opensaml.xacml.ctx.ResultType xacmlResult)
          Converts a XACML ResultType to a simple model Result.
static org.opensaml.xacml.ctx.ResultType resultToXACML(org.glite.authz.common.model.Result result)
          Converts a simple model Result in to a XACML ResultType.
static org.glite.authz.common.model.StatusCode statusCodeFromXACML(org.opensaml.xacml.ctx.StatusCodeType xacmlStatusCode)
          Converts a XACML StatusCodeType to a simple model StatusCode.
static org.opensaml.xacml.ctx.StatusCodeType statusCodeToXACML(org.glite.authz.common.model.StatusCode statusCode)
          Converts a simple model StatusCode in to a XACML StatusCodeType.
static org.glite.authz.common.model.Status statusFromXACML(org.opensaml.xacml.ctx.StatusType xacmlStatus)
          Converts a XACML StatusType to a simple model Status.
static org.opensaml.xacml.ctx.StatusType statusToXACML(org.glite.authz.common.model.Status status)
          Converts a simple model Status in to a XACML StatusType.
static org.glite.authz.common.model.Subject subjectFromXACML(org.opensaml.xacml.ctx.SubjectType xacmlSubject)
          Converts a XACML SubjectType to a simple model Subject.
static org.opensaml.xacml.ctx.SubjectType subjectToXACML(org.glite.authz.common.model.Subject subject)
          Converts a Subject to a XACML SubjectType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XACMLConverter

public XACMLConverter()
Method Detail

actionFromXACML

public static final org.glite.authz.common.model.Action actionFromXACML(org.opensaml.xacml.ctx.ActionType xacmlAction)
Converts a XACML ActionType to a simple model Action.

Parameters:
xacmlAction - the XACML action to be converted
Returns:
the simple model object

actionToXACML

public static final org.opensaml.xacml.ctx.ActionType actionToXACML(org.glite.authz.common.model.Action action)
Converts a Action to a XACML ActionType.

Parameters:
action - the simple model action to be converted
Returns:
the XACML object

attributeFromXACML

public static final org.glite.authz.common.model.Attribute attributeFromXACML(org.opensaml.xacml.ctx.AttributeType xacmlAttribute)
Converts a XACML AttributeType to a simple model Attribute.

Parameters:
xacmlAttribute - the XACML attribute to be converted
Returns:
the simple model object

attributeToXACML

public static final org.opensaml.xacml.ctx.AttributeType attributeToXACML(org.glite.authz.common.model.Attribute attribute)
Converts a Attribute to a XACML AttributeType. Attribute values are converted to string by means of the Object.toString() method.

Parameters:
attribute - the simple model attribute to be converted
Returns:
the XACML object

environmentFromXACML

public static final org.glite.authz.common.model.Environment environmentFromXACML(org.opensaml.xacml.ctx.EnvironmentType xacmlEnvironment)
Converts a XACML EnvironmentType to a simple model Environment.

Parameters:
xacmlEnvironment - the XACML environment to be converted
Returns:
the simple model object

environmentToXACML

public static final org.opensaml.xacml.ctx.EnvironmentType environmentToXACML(org.glite.authz.common.model.Environment environment)
Converts a Environment to a XACML EnvironmentType.

Parameters:
environment - the simple model environment to be converted
Returns:
the XACML object

obligationFromXACML

public static final org.glite.authz.common.model.Obligation obligationFromXACML(org.opensaml.xacml.policy.ObligationType xacmlObligation)
Converts a XACML ObligationType to a simple model Obligation. Note, this conversion only supports string content attribute assignments.

Parameters:
xacmlObligation - the XACML obligations to be converted
Returns:
the simple model object

obligationToXACML

public static final org.opensaml.xacml.policy.ObligationType obligationToXACML(org.glite.authz.common.model.Obligation obligation)
Converts a simple model Obligation in to a XACML ObligationType. Multi-value attribute assignments are not supported.

Parameters:
obligation - the simple model obligation to convert
Returns:
the XACML object

requestFromXACML

public static final org.glite.authz.common.model.Request requestFromXACML(org.opensaml.xacml.ctx.RequestType xacmlRequest)
Converts a XACML RequestType to a simple model Request.

Parameters:
xacmlRequest - the XACML request to be converted
Returns:
the simple model object

requestToXACML

public static final org.opensaml.xacml.ctx.RequestType requestToXACML(org.glite.authz.common.model.Request request)
Converts a Request to a XACML RequestType.

Parameters:
request - the simple model request to be converted
Returns:
the XACML object

resourceFromXACML

public static final org.glite.authz.common.model.Resource resourceFromXACML(org.opensaml.xacml.ctx.ResourceType xacmlResource)
Converts a XACML ResourceType to a simple model Resource. Only simple strings are supported as resource content values.

Parameters:
xacmlResource - the XACML resource to be converted
Returns:
the simple model object

resourceToXACML

public static final org.opensaml.xacml.ctx.ResourceType resourceToXACML(org.glite.authz.common.model.Resource resource)
Converts a Resource to a XACML ResourceType.

Parameters:
resource - the simple model resource to be converted
Returns:
the XACML object

responseFromXACML

public static final org.glite.authz.common.model.Response responseFromXACML(org.opensaml.xacml.ctx.ResponseType xacmlResponse,
                                                                            org.opensaml.xacml.ctx.RequestType xacmlRequest)
Converts a XACML ResponseType to a simple model Response.

Parameters:
xacmlResponse - the XACML response to be converted
xacmlRequest - the XACML request which rendered the given response, may be null
Returns:
the simple model object

responseToXACML

public static final org.opensaml.xacml.ctx.ResponseType responseToXACML(org.glite.authz.common.model.Response response)
Converts a Response to a XACML ResponseType. If the response contains a Request it must be converted separately. Only the first Result in the response is converted.

Parameters:
response - the simple model response to be converted
Returns:
the XACML object

resultFromXACML

public static final org.glite.authz.common.model.Result resultFromXACML(org.opensaml.xacml.ctx.ResultType xacmlResult)
Converts a XACML ResultType to a simple model Result.

Parameters:
xacmlResult - the XACML result to be converted
Returns:
the simple model object

resultToXACML

public static final org.opensaml.xacml.ctx.ResultType resultToXACML(org.glite.authz.common.model.Result result)
Converts a simple model Result in to a XACML ResultType.

Parameters:
result - the simple model result to convert
Returns:
the XACML object

statusCodeFromXACML

public static final org.glite.authz.common.model.StatusCode statusCodeFromXACML(org.opensaml.xacml.ctx.StatusCodeType xacmlStatusCode)
Converts a XACML StatusCodeType to a simple model StatusCode.

Parameters:
xacmlStatusCode - the XACML status code to be converted
Returns:
the simple model object

statusCodeToXACML

public static final org.opensaml.xacml.ctx.StatusCodeType statusCodeToXACML(org.glite.authz.common.model.StatusCode statusCode)
Converts a simple model StatusCode in to a XACML StatusCodeType.

Parameters:
statusCode - the simple model status code to convert
Returns:
the XACML object

statusFromXACML

public static final org.glite.authz.common.model.Status statusFromXACML(org.opensaml.xacml.ctx.StatusType xacmlStatus)
Converts a XACML StatusType to a simple model Status. Note, this conversion does not support the XACML status details.

Parameters:
xacmlStatus - the XACML status to be converted
Returns:
the simple model object

statusToXACML

public static final org.opensaml.xacml.ctx.StatusType statusToXACML(org.glite.authz.common.model.Status status)
Converts a simple model Status in to a XACML StatusType.

Parameters:
status - the simple model status to convert
Returns:
the XACML object

subjectFromXACML

public static final org.glite.authz.common.model.Subject subjectFromXACML(org.opensaml.xacml.ctx.SubjectType xacmlSubject)
Converts a XACML SubjectType to a simple model Subject.

Parameters:
xacmlSubject - the XACML subject to be converted
Returns:
the simple model object

subjectToXACML

public static final org.opensaml.xacml.ctx.SubjectType subjectToXACML(org.glite.authz.common.model.Subject subject)
Converts a Subject to a XACML SubjectType.

Parameters:
subject - the simple model subject to be converted
Returns:
the XACML object


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.