com.force.sdk.oauth.context
Class ForceSecurityContext

java.lang.Object
  extended by com.force.sdk.oauth.context.ForceSecurityContext
All Implemented Interfaces:
SecurityContext, Serializable

public final class ForceSecurityContext
extends Object
implements SecurityContext, Serializable

This is the default implementation of a SecurityContext. This is what will hold an authenticated user's data if a custom user data retriever is not used. When using a custom user data retriever the CustomSecurityContext will wrap a ForceSecurityContext and add the additional custom fields.

Author:
John Simone
See Also:
Serialized Form

Constructor Summary
ForceSecurityContext()
           
 
Method Summary
 String getEndPoint()
          Gets the endPoint.
 SecurityContext getForceSecurityContext()
          Gets the forceSecurityContext.
 String getLanguage()
          Gets the language.
 String getLocale()
          Gets the locale.
 String getOrgId()
          Gets the orgId.
 String getRefreshToken()
          Gets the refreshToken.
 String getRole()
          Gets the role.
 String getSessionId()
          Gets the sessionId.
 String getTimeZone()
          Gets the timeZone.
 String getUserId()
          Gets the userId.
 String getUserName()
          Gets the userName.
 void init(com.sforce.soap.partner.GetUserInfoResult userInfo)
          Initialize the security context from a GetUserInfoResult object.
 void setEndPoint(String endPoint)
          Sets the endPoint.
 void setLanguage(String language)
          Sets the language.
 void setLocale(String locale)
          Sets the locale.
 void setOrgId(String orgId)
          Sets the orgid.
 void setRefreshToken(String refreshToken)
          Sets the refreshToken.
 void setRole(String role)
          Sets the role.
 void setSessionId(String sessionId)
          Sets the sessionId.
 void setTimeZone(String timeZone)
          Sets the timeZone.
 void setUserId(String userId)
          Sets the userId.
 void setUserName(String userName)
          Sets the userName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForceSecurityContext

public ForceSecurityContext()
Method Detail

init

public void init(com.sforce.soap.partner.GetUserInfoResult userInfo)
Initialize the security context from a GetUserInfoResult object. Initialize the security context from a GetUserInfoResult object.

Specified by:
init in interface SecurityContext
Parameters:
userInfo - GetUserInfoResult

setOrgId

public void setOrgId(String orgId)
Description copied from interface: SecurityContext
Sets the orgid.

Specified by:
setOrgId in interface SecurityContext
Parameters:
orgId - String

getOrgId

public String getOrgId()
Description copied from interface: SecurityContext
Gets the orgId.

Specified by:
getOrgId in interface SecurityContext
Returns:
orgId

setUserId

public void setUserId(String userId)
Description copied from interface: SecurityContext
Sets the userId.

Specified by:
setUserId in interface SecurityContext
Parameters:
userId - String

getUserId

public String getUserId()
Description copied from interface: SecurityContext
Gets the userId.

Specified by:
getUserId in interface SecurityContext
Returns:
userId

setEndPoint

public void setEndPoint(String endPoint)
Description copied from interface: SecurityContext
Sets the endPoint.

Specified by:
setEndPoint in interface SecurityContext
Parameters:
endPoint - String

getEndPoint

public String getEndPoint()
Description copied from interface: SecurityContext
Gets the endPoint.

Specified by:
getEndPoint in interface SecurityContext
Returns:
endPoint

setSessionId

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

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

getSessionId

public String getSessionId()
Description copied from interface: SecurityContext
Gets the sessionId.

Specified by:
getSessionId in interface SecurityContext
Returns:
sessionId

setRefreshToken

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

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

getRefreshToken

public String getRefreshToken()
Description copied from interface: SecurityContext
Gets the refreshToken.

Specified by:
getRefreshToken in interface SecurityContext
Returns:
refreshToken

setUserName

public void setUserName(String userName)
Description copied from interface: SecurityContext
Sets the userName.

Specified by:
setUserName in interface SecurityContext
Parameters:
userName - String

getUserName

public String getUserName()
Description copied from interface: SecurityContext
Gets the userName.

Specified by:
getUserName in interface SecurityContext
Returns:
userName

setLanguage

public void setLanguage(String language)
Description copied from interface: SecurityContext
Sets the language.

Specified by:
setLanguage in interface SecurityContext
Parameters:
language - String

getLanguage

public String getLanguage()
Description copied from interface: SecurityContext
Gets the language.

Specified by:
getLanguage in interface SecurityContext
Returns:
language

setLocale

public void setLocale(String locale)
Description copied from interface: SecurityContext
Sets the locale.

Specified by:
setLocale in interface SecurityContext
Parameters:
locale - String

getLocale

public String getLocale()
Description copied from interface: SecurityContext
Gets the locale.

Specified by:
getLocale in interface SecurityContext
Returns:
locale

setTimeZone

public void setTimeZone(String timeZone)
Description copied from interface: SecurityContext
Sets the timeZone.

Specified by:
setTimeZone in interface SecurityContext
Parameters:
timeZone - String

getTimeZone

public String getTimeZone()
Description copied from interface: SecurityContext
Gets the timeZone.

Specified by:
getTimeZone in interface SecurityContext
Returns:
timeZone

setRole

public void setRole(String role)
Description copied from interface: SecurityContext
Sets the role.

Specified by:
setRole in interface SecurityContext
Parameters:
role - String

getRole

public String getRole()
Description copied from interface: SecurityContext
Gets the role.

Specified by:
getRole in interface SecurityContext
Returns:
role

getForceSecurityContext

public SecurityContext getForceSecurityContext()
Description copied from interface: SecurityContext
Gets the forceSecurityContext.

Specified by:
getForceSecurityContext in interface SecurityContext
Returns:
forceSecurityContext


Copyright © 2011. All Rights Reserved.