org.openliberty.openaz.pep
Class AzWrapperRequestObject<T extends java.lang.Enum<T>>

java.lang.Object
  extended by org.openliberty.openaz.pep.AzWrapperObject<T>
      extended by org.openliberty.openaz.pep.AzWrapperRequestObject<T>
Type Parameters:
T -
Direct Known Subclasses:
Action, Environment, Resource, Subject

public class AzWrapperRequestObject<T extends java.lang.Enum<T>>
extends AzWrapperObject<T>

A wrapper around AzEntity that simplifies the setting of some common XACML sttributes using Java Objects. The simplifying assumption is that there are reasonable defaults between Java Objects and XACML Attribute Types

Java Class XACML Type (AzAttributeValue)
java.lang.String AzAttributeValueString
java.lang.Boolean AzAttributeValueBoolean
java.util.Date AzAttributeValueDate


Field Summary
 
Fields inherited from class org.openliberty.openaz.pep.AzWrapperObject
wrappedObject
 
Constructor Summary
AzWrapperRequestObject( wrappedObject, PepRequest ctx, AzWrapperRequestObjectFactory<T> factory)
          Creates an instance of the AzWrapperRequestObject
 
Method Summary
 PepRequest getPepRequest()
          Return the PepRequest object that contains this wrapped AzEntity object.
 void setAttribute(java.lang.String name, java.util.Date date)
          Adds the name, date parameter pair as an AttributeId and Date AttributeValue to the wrapped AzEntity object.
 void setAttribute(java.lang.String name, java.lang.String value)
          Adds the name, value parameter pair as an AttributeId and String AttributeValue to the wrapped AzEntity object.
 void setPepRequest(PepRequest wrappedCtx)
          Set the PepRequest that contains this AzWrapperRequestObject, which wraps an AzEntity.
 
Methods inherited from class org.openliberty.openaz.pep.AzWrapperObject
getWrappedObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AzWrapperRequestObject

public AzWrapperRequestObject( wrappedObject,
                              PepRequest ctx,
                              AzWrapperRequestObjectFactory<T> factory)
Creates an instance of the AzWrapperRequestObject

Parameters:
wrappedObject -
ctx -
factory - the factory used to create the object. This is used by the map method to get all of the registered JavaObjectMapper for that category, and populate the attributes of the underlying AzEntity
Method Detail

setPepRequest

public void setPepRequest(PepRequest wrappedCtx)
Set the PepRequest that contains this AzWrapperRequestObject, which wraps an AzEntity.

Parameters:
wrappedCtx -

getPepRequest

public PepRequest getPepRequest()
Return the PepRequest object that contains this wrapped AzEntity object.

Returns:

setAttribute

public void setAttribute(java.lang.String name,
                         java.util.Date date)
Adds the name, date parameter pair as an AttributeId and Date AttributeValue to the wrapped AzEntity object.

Parameters:
name - a string with a name to be used as AttributeId
value - a Date to be used as an AttributeValue

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
Adds the name, value parameter pair as an AttributeId and String AttributeValue to the wrapped AzEntity object.

Parameters:
name -
value -