net.geant.edugain.base
Class AttributeRequest

java.lang.Object
  extended by net.geant.edugain.base.Request
      extended by net.geant.edugain.base.AttributeRequest
All Implemented Interfaces:
java.io.Serializable

public class AttributeRequest
extends Request
implements java.io.Serializable

A request for attributes pertaining to a certain subject. It must contain the handle corresponding to the subject, a list of attribute identifiers requested, and a resource/service identifier.

This class extends Request.

Author:
Jose Manuel Macias
See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<java.lang.String> attributeNameList
          A list of the attribute names whose values are requested.
protected  java.lang.String homeSite
          The home site of the user where the request is going to be solved.
private  org.apache.log4j.Logger log
           
protected  java.net.URI referred
          The URI from where the requester has been redirected to this service.
protected  java.lang.String subjectHandle
          The identification string obtained upon the last successful authentication of the subject requesting access to the resource.
 
Fields inherited from class net.geant.edugain.base.Request
cacheReference, consumerId, producerId, requestID, resource
 
Constructor Summary
AttributeRequest()
          Creates a new instance of AttributeRequest
AttributeRequest(org.opensaml.SAMLRequest req)
          Creates a new instance of AttributeRequest and fills it with a SAMLRequest.
 
Method Summary
 void fromSAML(org.opensaml.SAMLRequest req)
          Fill this AttributeRequest from a SAMLRequest.
 java.util.ArrayList<java.lang.String> getAttributeNameList()
          Get values for the AttributeNameList
 java.lang.String getHomeSite()
          Gets the value of the HomeSite
 java.net.URI getReferred()
          Gets the URI from where the requester was redirected to this service
 java.lang.String getSubjectHandle()
          Gets the value of the SubjectHandle
 void setAttributeNameList(java.util.ArrayList<java.lang.String> list)
          Set values for the AttributeNameList
 void setHomeSite(java.lang.String homesite)
          Sets the HomeSite
 void setReferred(java.net.URI ref)
          Sets the URI from where the requester was redirected to this service
 void setSubjectHandle(java.lang.String handle)
          Sets the subject handle
 org.opensaml.SAMLRequest toSAML()
          Converts the eduGAIN AttributeRequest object into a SAMLRequest object
 
Methods inherited from class net.geant.edugain.base.Request
generateRequestID, getCacheReference, getConsumerId, getIssued, getProducerId, getRequestID, getResource, getValidatedTrust, setCacheReference, setConsumerId, setIssued, setProducerId, setRequestID, setRequestID, setResource, setValidatedTrust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subjectHandle

protected java.lang.String subjectHandle
The identification string obtained upon the last successful authentication of the subject requesting access to the resource.


attributeNameList

protected java.util.ArrayList<java.lang.String> attributeNameList
A list of the attribute names whose values are requested. If no AttributeNameList is included in a request, all "available" (those that can be released according to the applicable policy) attributes are requested. [optional]


homeSite

protected java.lang.String homeSite
The home site of the user where the request is going to be solved. This value corresponds to the ConnectTo value in the HomeLocationRequest operation.


log

private org.apache.log4j.Logger log

referred

protected java.net.URI referred
The URI from where the requester has been redirected to this service.

Constructor Detail

AttributeRequest

public AttributeRequest()
Creates a new instance of AttributeRequest


AttributeRequest

public AttributeRequest(org.opensaml.SAMLRequest req)
Creates a new instance of AttributeRequest and fills it with a SAMLRequest.

Method Detail

setSubjectHandle

public void setSubjectHandle(java.lang.String handle)
Sets the subject handle


getSubjectHandle

public java.lang.String getSubjectHandle()
Gets the value of the SubjectHandle


setAttributeNameList

public void setAttributeNameList(java.util.ArrayList<java.lang.String> list)
Set values for the AttributeNameList


getAttributeNameList

public java.util.ArrayList<java.lang.String> getAttributeNameList()
Get values for the AttributeNameList


setHomeSite

public void setHomeSite(java.lang.String homesite)
Sets the HomeSite


getHomeSite

public java.lang.String getHomeSite()
Gets the value of the HomeSite


setReferred

public void setReferred(java.net.URI ref)
Sets the URI from where the requester was redirected to this service


getReferred

public java.net.URI getReferred()
Gets the URI from where the requester was redirected to this service


fromSAML

public void fromSAML(org.opensaml.SAMLRequest req)
              throws BaseException
Fill this AttributeRequest from a SAMLRequest.

Parameters:
req - The SAMLRequest
Throws:
BaseException

toSAML

public org.opensaml.SAMLRequest toSAML()
                                throws BaseException
Converts the eduGAIN AttributeRequest object into a SAMLRequest object

Returns:
SAMLRequest The SAMLRequest representation of the eduGAIN AttributeRequest
Throws:
BaseException