com.force.sdk.oauth.userdata
Class UserDataRetrievalService

java.lang.Object
  extended by com.force.sdk.oauth.userdata.UserDataRetrievalService
Direct Known Subclasses:
CustomUserDataRetrievalService

public class UserDataRetrievalService
extends Object

Retrieves data about the authenticated user for storage in the SecurityContext.

Author:
John Simone

Constructor Summary
UserDataRetrievalService()
          Creates a ForceUserDataRetriever.
UserDataRetrievalService(boolean storeUsername)
          Creates the service with the given value for the storeUsername flag.
 
Method Summary
 boolean isStoreUsername()
          Returns whether or not the username should be stored.
 SecurityContext retrieveUserData(String sessionId, String endpoint, String refreshToken)
          Sets up the user data retriever and retrieves data about the user.
 void setStoreUsername(boolean storeUsername)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDataRetrievalService

public UserDataRetrievalService(boolean storeUsername)
Creates the service with the given value for the storeUsername flag.

Parameters:
storeUsername - boolean

UserDataRetrievalService

public UserDataRetrievalService()
Creates a ForceUserDataRetriever.

Method Detail

retrieveUserData

public SecurityContext retrieveUserData(String sessionId,
                                        String endpoint,
                                        String refreshToken)
                                 throws com.sforce.ws.ConnectionException
Sets up the user data retriever and retrieves data about the user.

Parameters:
sessionId - String
endpoint - String
refreshToken - String
Returns:
SecurityContext containing data about the user
Throws:
com.sforce.ws.ConnectionException - connection error

setStoreUsername

public void setStoreUsername(boolean storeUsername)

isStoreUsername

public boolean isStoreUsername()
Returns whether or not the username should be stored.

Returns:
boolean


Copyright © 2012. All Rights Reserved.