com.force.sdk.oauth.userdata
Class ForceUserDataRetriever

java.lang.Object
  extended by com.force.sdk.oauth.userdata.ForceUserDataRetriever
All Implemented Interfaces:
UserDataRetriever
Direct Known Subclasses:
CustomUserDataRetriever

public class ForceUserDataRetriever
extends Object
implements UserDataRetriever

This is the standard UserDataRetriever. It calls out to obtain the default user data and should be called to populate the ForceSecurityContext whether or not a customized UserDataRetriever is provided.

Author:
John Simone

Constructor Summary
ForceUserDataRetriever()
           
 
Method Summary
protected  String getEndpoint()
           
protected  String getRefreshToken()
           
protected  String getSessionId()
           
 boolean isStoreUsername()
          Flag stating whether or not the username should be stored.
 SecurityContext retrieveUserData()
          Retrieve the default user data from the partner API.
 void setEndpoint(String endpoint)
          Sets the endpoint.
 void setRefreshToken(String refreshToken)
          Sets the refreshToken.
 void setSessionId(String sessionId)
          Sets the sessionId.
 void setStoreUsername(boolean storeUsername)
          Sets the storeUsername flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForceUserDataRetriever

public ForceUserDataRetriever()
Method Detail

retrieveUserData

public SecurityContext retrieveUserData()
                                 throws com.sforce.ws.ConnectionException
Retrieve the default user data from the partner API.

Specified by:
retrieveUserData in interface UserDataRetriever
Returns:
SecurityContext
Throws:
com.sforce.ws.ConnectionException - if a connection to the partner API cannot be made

setSessionId

public void setSessionId(String sessionId)
Description copied from interface: UserDataRetriever
Sets the sessionId.

Specified by:
setSessionId in interface UserDataRetriever
Parameters:
sessionId - String

setEndpoint

public void setEndpoint(String endpoint)
Description copied from interface: UserDataRetriever
Sets the endpoint.

Specified by:
setEndpoint in interface UserDataRetriever
Parameters:
endpoint - String

setRefreshToken

public void setRefreshToken(String refreshToken)
Description copied from interface: UserDataRetriever
Sets the refreshToken.

Specified by:
setRefreshToken in interface UserDataRetriever
Parameters:
refreshToken - String

getSessionId

protected String getSessionId()

getEndpoint

protected String getEndpoint()

getRefreshToken

protected String getRefreshToken()

isStoreUsername

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

Returns:
boolean

setStoreUsername

public void setStoreUsername(boolean storeUsername)
Description copied from interface: UserDataRetriever
Sets the storeUsername flag.

Specified by:
setStoreUsername in interface UserDataRetriever
Parameters:
storeUsername - flag


Copyright © 2011. All Rights Reserved.