com.adobe.edc.server.spi.authorization
Class ExternalAuthDTO

java.lang.Object
  extended by com.adobe.edc.server.spi.authorization.ExternalAuthDTO
All Implemented Interfaces:
java.io.Serializable

public class ExternalAuthDTO
extends java.lang.Object
implements java.io.Serializable

The ExternalAuthDTO class is used for sending all the information to the evaluate() method. When the Rights Management Service calls the implementation, it creates an instance of this class, fills in all the information, and sends it to the implementation call. The implementation class can use the methods to query and retrieve values.

See Also:
Serialized Form

Constructor Summary
ExternalAuthDTO()
           
 
Method Summary
 java.lang.String getAlternateId()
          Retrieves the external identifier, if any, associated with the license.
 java.lang.String getClientIPAddress()
          Retrieves the client IP address.
 java.lang.Object getContext()
          Retrieves the context of the authenticated client as an object.
 java.lang.String getLicenseId()
          Retrieves the license identifier for the secured document.
 java.lang.String getLocale()
          Retrieves the server locale information.
 ExternalAuthOperationType getOperationType()
          Retrieves the type of operation being performed by the client.
 java.util.ArrayList getPermissions()
          Retrieves a list of allowable permissions as per the Rights Management Service policy evaluator.
 java.lang.String getPolicyId()
          Returns the policy identifier used for securing the document.
 java.util.List getPolicyProperty(java.lang.String propname)
          Retrieves the value for a given property within a policy.
 java.util.HashMap getPolicyProps()
          Retrieves the list of policy properties.
 java.util.HashMap getRequestHeaders()
          Retrieves the list of HTTP request headers.
 boolean isAnonymous()
          Determines whether the authenticated client is an anonymous user.
 void setAlternateId(java.lang.String alternateId)
          Sets the external identifier associated with the license.
 void setAnonymous(boolean isAnonymous)
          Sets whether the user is anonymous.
 void setClientIPAddress(java.lang.String clientIPAddress)
          Sets the client IP address.
 void setContext(java.lang.Object context)
          Sets the authenticated user's context.
 void setLicenseId(java.lang.String licenseId)
          Sets the license identifier used for securing the document.
 void setLocale(java.lang.String locale)
          Sets the server locale.
 void setOperationType(ExternalAuthOperationType operationType)
          Sets the operation type performed by the user.
 void setPermissions(java.util.ArrayList permissions)
          Sets the allowable permission as evaluated by Rights Management Service.
 void setPolicyId(java.lang.String policyId)
          Sets the policy identifier used for securing the document.
 void setPolicyProperty(java.lang.String propname, java.util.List value)
          Sets the property value for a particular property.
 void setPolicyProps(java.util.HashMap policyProps)
          Sets the list of policy properties.
 void setRequestHeaders(java.util.HashMap requestHeaders)
          Sets the list of HTTP request headers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalAuthDTO

public ExternalAuthDTO()
Method Detail

getClientIPAddress

public java.lang.String getClientIPAddress()
Retrieves the client IP address.

Returns:
A java.lang.String containing the client IP address.

setClientIPAddress

public void setClientIPAddress(java.lang.String clientIPAddress)
Sets the client IP address. The Rights Management service sets the client IP address for the evaluate() method.

Parameters:
clientIPAddress - A java.lang.String containing the IP address of the client.

getContext

public java.lang.Object getContext()
Retrieves the context of the authenticated client as an object.

Returns:
The context of the authenticated client as an object. Clients can cast it to context.

setContext

public void setContext(java.lang.Object context)
Sets the authenticated user's context. The Rights Management service sets the context for the evaluate() method.

Parameters:
context - The authenticated user's context.

isAnonymous

public boolean isAnonymous()
Determines whether the authenticated client is an anonymous user.

Returns:
true if the authenticated client is an anonymous user, false otherwise.

setAnonymous

public void setAnonymous(boolean isAnonymous)
Sets whether the user is anonymous. The Rights Management service sets the value for the evaluate() method.

Parameters:
isAnonymous - true if the authenticated client is an anonymous user, false otherwise.

getLicenseId

public java.lang.String getLicenseId()
Retrieves the license identifier for the secured document.

Returns:
A java.lang.String containing the license identifier for the secured document.

setLicenseId

public void setLicenseId(java.lang.String licenseId)
Sets the license identifier used for securing the document. The Rights Management service sets the value for the evaluate() method.

Parameters:
licenseId - A java.lang.String containing the license identifier for the secured document.

getOperationType

public ExternalAuthOperationType getOperationType()
Retrieves the type of operation being performed by the client.

Returns:
The type of operation being performed by the client.

setOperationType

public void setOperationType(ExternalAuthOperationType operationType)
Sets the operation type performed by the user. The Rights Management service sets the value for the evaluate() method.

Parameters:
operationType - One of secure or view.

getPermissions

public java.util.ArrayList getPermissions()
Retrieves a list of allowable permissions as per the Rights Management Service policy evaluator.

Returns:
A java.util.ArrayList of allowable permissions as per the Rights Management Service policy evaluator.

setPermissions

public void setPermissions(java.util.ArrayList permissions)
Sets the allowable permission as evaluated by Rights Management Service. The Rights Management Service sets the value for the evaluate() method.

Parameters:
permissions - A java.util.ArrayList of permissions.

getPolicyId

public java.lang.String getPolicyId()
Returns the policy identifier used for securing the document.

Returns:
The policy identifier used for securing the document.

setPolicyId

public void setPolicyId(java.lang.String policyId)
Sets the policy identifier used for securing the document. The Rights Management Service sets the value for the evaluate() method.

Parameters:
policyId - A java.lang.String containing the value.

getPolicyProps

public java.util.HashMap getPolicyProps()
Retrieves the list of policy properties.

Returns:
A list of policy properties.

setPolicyProps

public void setPolicyProps(java.util.HashMap policyProps)
Sets the list of policy properties. The Rights Management Service sets the value for the evaluate() method.

Parameters:
policyProps - The list of policy properties.

getPolicyProperty

public java.util.List getPolicyProperty(java.lang.String propname)
Retrieves the value for a given property within a policy.

Parameters:
propname - A java.lang.String containing the property name for which to return a value.
Returns:
The value for a given property within a policy.

setPolicyProperty

public void setPolicyProperty(java.lang.String propname,
                              java.util.List value)
Sets the property value for a particular property. The Rights Management Service sets the value for the evaluate() method.

Parameters:
propname - A java.lang.String containing the property to set the value for.
value - The value to which to set the property.

getLocale

public java.lang.String getLocale()
Retrieves the server locale information.

Returns:
The server locale information.

setLocale

public void setLocale(java.lang.String locale)
Sets the server locale. The Rights Management Service sets the value for the evaluate() method.

Parameters:
locale - A java.lang.String containing the server locale.

getAlternateId

public java.lang.String getAlternateId()
Retrieves the external identifier, if any, associated with the license.

Returns:
A java.lang.String containing the external identifier, if any, associated with the license.

setAlternateId

public void setAlternateId(java.lang.String alternateId)
Sets the external identifier associated with the license. The Rights Management Service sets the value for the evaluate() method.

Parameters:
alternateId - A java.lang.String containing the external identifier.

getRequestHeaders

public java.util.HashMap getRequestHeaders()
Retrieves the list of HTTP request headers.

Returns:
A list of request headers.

setRequestHeaders

public void setRequestHeaders(java.util.HashMap requestHeaders)
Sets the list of HTTP request headers. The Rights Management Service sets the value for the evaluate() method.

Parameters:
requestHeaders - The list of request headers.