com.adobe.idp
Class Context

java.lang.Object
  extended by com.adobe.idp.Context
All Implemented Interfaces:
java.io.Serializable

public final class Context
extends java.lang.Object
implements java.io.Serializable

This class represents an authenticated LiveCycle ES2 user or group. You can use a com.adobe.idp.Context object to invoke a LiveCycle ES2 service using an authenticated user (the com.adobe.idp.Context object represents an authenticated user). When using a com.adobe.idp.Context object, you do not need to set the DSC_CREDENTIAL_USERNAME or DSC_CREDENTIAL_PASSWORD connection settings. You can obtain a com.adobe.idp.Context object when authenicating users by using the AuthenticationManagerServiceClient objectís authenticate method. For information about using this object to authenticate a user and invoking a LiveCycle ES2 service, see the Authenticating Users topic in Programming with LiveCycle ES4.

See Also:
Serialized Form

Constructor Summary
Context()
          Default constructor.
 
Method Summary
static Context create(byte[] buf)
          Instantiates a context from a byte array.
 User getAuthenticatedUser()
          Retrieves the authenticated user.
 java.util.Date getExpirationHint()
          Provides a date indicating when this Context will expire.
 java.lang.String getRequestId()
          Retrieves the request identifier value.
 java.lang.String getUserAssertion()
          Retrieves the user's assertion string.
 void initPrincipal(AuthResult authResult)
          Initializes the Context object's Principal (the authenticated user).
 void initRequestId(java.lang.String requestId)
          Initializes the request identifier value.
 boolean isComplete()
          Determines if the context is complete
 byte[] toByteArray()
          Converts a context to a byte array.
 java.lang.String toString()
          Retrieves a printable rendition of the context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context()
Default constructor.

Method Detail

create

public static Context create(byte[] buf)
Instantiates a context from a byte array.

Parameters:
buf - The byte array used to create the context.
Returns:
The context.

toByteArray

public byte[] toByteArray()
Converts a context to a byte array.

Returns:
A byte array containing the context information.

initPrincipal

public void initPrincipal(AuthResult authResult)
Initializes the Context object's Principal (the authenticated user).

This method is called to set the authenticated user in the Context object. The only way to get an AuthResult is by invoking the authenticate method in the AuthenticationManagerServiceClient class.

To see this method used in a code example, see the Authenticating a user using the Java API quick start in Programming with LiveCycle ES4.

Parameters:
authResult - An AuthResult object that represents the authenticated user.

isComplete

public boolean isComplete()
Determines if the context is complete

Returns:
A boolean value that specifies if the context is complete.

getAuthenticatedUser

public User getAuthenticatedUser()
Retrieves the authenticated user.

Returns:
A User object that represents the authenticated user.

getExpirationHint

public java.util.Date getExpirationHint()
Provides a date indicating when this Context will expire. There is no guarantee that the value is accurate, but it will be no later than the actual expiration date.

Returns:
The latest possible expiration date.

getUserAssertion

public java.lang.String getUserAssertion()
Retrieves the user's assertion string.

Returns:
The user's assertion string.

initRequestId

public void initRequestId(java.lang.String requestId)
Initializes the request identifier value.

Parameters:
requestId - The request ID to be initialized.

getRequestId

public java.lang.String getRequestId()
Retrieves the request identifier value.

Returns:
The request identifier value.

toString

public java.lang.String toString()
Retrieves a printable rendition of the context.

Overrides:
toString in class java.lang.Object


[an error occurred while processing this directive] [an error occurred while processing this directive]