com.force.sdk.oauth.context
Class CustomSecurityContext

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

public abstract class CustomSecurityContext
extends Object
implements SecurityContext, Serializable

CustomSecurityContext should be extended when using a custom data retriever. The base functionality wraps ForceSecurityContext and provides the methods that are necessary to implement SecurityContext. The extension should contain fields along with getters and setters that represent any custom user data that will be stored about the authenticated user. See @doclink force-security for more information.

Author:
John Simone
See Also:
Serialized Form

Constructor Summary
CustomSecurityContext()
           
 
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 SecurityContext from a GetUserInfoResult object.
 void setEndPoint(String endPoint)
          Sets the endPoint.
 void setForceSecurityContext(SecurityContext sc)
           
 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

CustomSecurityContext

public CustomSecurityContext()
Method Detail

init

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

Specified by:
init in interface SecurityContext
Parameters:
userInfo - a user info result from the partner api

setOrgId

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

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

getOrgId

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

Specified by:
getOrgId in interface SecurityContext
Returns:
orgId

setUserId

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

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

getUserId

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

Specified by:
getUserId in interface SecurityContext
Returns:
userId

setEndPoint

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

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

getEndPoint

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

Specified by:
getEndPoint in interface SecurityContext
Returns:
endPoint

setSessionId

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

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

getSessionId

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

Specified by:
getSessionId in interface SecurityContext
Returns:
sessionId

setRefreshToken

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

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

getRefreshToken

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

Specified by:
getRefreshToken in interface SecurityContext
Returns:
refreshToken

setUserName

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

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

getUserName

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

Specified by:
getUserName in interface SecurityContext
Returns:
userName

setLanguage

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

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

getLanguage

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

Specified by:
getLanguage in interface SecurityContext
Returns:
language

setLocale

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

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

getLocale

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

Specified by:
getLocale in interface SecurityContext
Returns:
locale

setTimeZone

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

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

getTimeZone

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

Specified by:
getTimeZone in interface SecurityContext
Returns:
timeZone

getRole

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

Specified by:
getRole in interface SecurityContext
Returns:
role

setRole

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

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

setForceSecurityContext

public final void setForceSecurityContext(SecurityContext sc)

getForceSecurityContext

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

Specified by:
getForceSecurityContext in interface SecurityContext
Returns:
forceSecurityContext


Copyright © 2011. All Rights Reserved.