public class

SalesforceOAuthConnectorOAuthManager

extends SalesforceOAuthConnectorHttpCallbackAdapter
implements MuleContextAware Initialisable Capabilities MetadataAware OAuthManager<C extends OAuthAdapter> ProcessAdapter<O>
java.lang.Object
   ↳ org.mule.modules.salesforce.adapters.SalesforceOAuthConnectorHttpCallbackAdapter
     ↳ org.mule.modules.salesforce.oauth.SalesforceOAuthConnectorOAuthManager

Class Overview

A SalesforceOAuthConnectorOAuthManager is a wrapper around SalesforceOAuthConnector that adds access token management capabilities to the pojo.

Summary

Constants
String DEVKIT_BUILD
String DEVKIT_VERSION
String MODULE_NAME
String MODULE_VERSION
[Expand]
Inherited Constants
From interface org.mule.api.lifecycle.Initialisable
Fields
private ObjectStore accessTokenObjectStore
private GenericKeyedObjectPool accessTokenPool Access Token Pool
private KeyedPoolableObjectFactory accessTokenPoolFactory Access Token Pool Factory
private String accessTokenUrl
private Boolean allowFieldTruncationSupport
private String assignmentRuleId
private String authorizationUrl
private Integer batchSobjectMaxDepth
private String clientId
private String consumerKey
private String consumerSecret
private SalesforceOAuthConnectorOAuth2Adapter defaultUnauthorizedConnector
protected FlowConstruct flowConstruct Flow Construct
private static Logger logger
protected MuleContext muleContext muleContext
private ObjectStore<? extends Serializable> timeObjectStore
private Boolean useDefaultRule
[Expand]
Inherited Fields
From class org.mule.modules.salesforce.adapters.SalesforceOAuthConnectorHttpCallbackAdapter
Public Constructors
SalesforceOAuthConnectorOAuthManager()
Public Methods
SalesforceOAuthConnectorOAuth2Adapter acquireAccessToken(String userId)
Borrow an access token from the pool
String authorize(Map<String, String> extraParameters, String authorizationUrl, String redirectUri)
SalesforceOAuthConnectorOAuth2Adapter createAccessToken(String verifier)
Create a new access token using the specified verifier and insert it into the pool
void destroyAccessToken(String userId, SalesforceOAuthConnectorOAuth2Adapter connector)
void dispose()
ObjectStore getAccessTokenObjectStore()
Retrieves accessTokenObjectStore
KeyedPoolableObjectFactory getAccessTokenPoolFactory()
Retrieves accessTokenPoolFactory
String getAccessTokenUrl()
Retrieves accessTokenUrl
Boolean getAllowFieldTruncationSupport()
Retrieves allowFieldTruncationSupport
String getAssignmentRuleId()
Retrieves assignmentRuleId
String getAuthorizationUrl()
Retrieves authorizationUrl
Integer getBatchSobjectMaxDepth()
Retrieves batchSobjectMaxDepth
String getClientId()
Retrieves clientId
String getConsumerKey()
Retrieves consumerKey
String getConsumerSecret()
Retrieves consumerSecret
SalesforceOAuthConnectorOAuth2Adapter getDefaultUnauthorizedConnector()
Retrieves defaultUnauthorizedConnector
String getDevkitBuild()
Returns the build of the DevKit used to create this module
String getDevkitVersion()
Returns the version of the DevKit used to create this module
FlowConstruct getFlowConstruct()
Retrieves flowConstruct
String getModuleName()
Returns the user-friendly name of this module
String getModuleVersion()
Returns the version of this module
MuleContext getMuleContext()
Retrieves muleContext
<P> ProcessTemplate<P, SalesforceOAuthConnectorOAuth2Adapter> getProcessTemplate()
ObjectStore<? extends Serializable> getTimeObjectStore()
Retrieves timeObjectStore
Boolean getUseDefaultRule()
Retrieves useDefaultRule
void initialise()
boolean isCapableOf(Capability capability)
Returns true if this module implements such capability
void releaseAccessToken(String userId, SalesforceOAuthConnectorOAuth2Adapter connector)
void setAccessTokenObjectStore(ObjectStore value)
Sets accessTokenObjectStore
void setAccessTokenUrl(String value)
Sets accessTokenUrl
void setAllowFieldTruncationSupport(Boolean value)
Sets allowFieldTruncationSupport
void setAssignmentRuleId(String value)
Sets assignmentRuleId
void setAuthorizationUrl(String value)
Sets authorizationUrl
void setBatchSobjectMaxDepth(Integer value)
Sets batchSobjectMaxDepth
void setClientId(String value)
Sets clientId
void setConsumerKey(String value)
Sets consumerKey
void setConsumerSecret(String value)
Sets consumerSecret
void setFlowConstruct(FlowConstruct flowConstruct)
void setMuleContext(MuleContext muleContext)
void setTimeObjectStore(ObjectStore<? extends Serializable> value)
Sets timeObjectStore
void setUseDefaultRule(Boolean value)
Sets useDefaultRule
void start()
void stop()
[Expand]
Inherited Methods
From class org.mule.modules.salesforce.adapters.SalesforceOAuthConnectorHttpCallbackAdapter
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.modules.salesforce.adapter.HttpCallbackAdapter
From interface org.mule.modules.salesforce.basic.Capabilities
From interface org.mule.modules.salesforce.basic.MetadataAware
From interface org.mule.modules.salesforce.oauth.OAuthManager
From interface org.mule.modules.salesforce.process.ProcessAdapter

Constants

private static final String DEVKIT_BUILD

Constant Value: "3.4.0.1555.8df15c1"

private static final String DEVKIT_VERSION

Constant Value: "3.4.0"

private static final String MODULE_NAME

Constant Value: "Salesforce (OAuth)"

private static final String MODULE_VERSION

Constant Value: "5.3.7"

Fields

private ObjectStore accessTokenObjectStore

private GenericKeyedObjectPool accessTokenPool

Access Token Pool

private KeyedPoolableObjectFactory accessTokenPoolFactory

Access Token Pool Factory

private String accessTokenUrl

private Boolean allowFieldTruncationSupport

private String assignmentRuleId

private String authorizationUrl

private Integer batchSobjectMaxDepth

private String clientId

private String consumerKey

private String consumerSecret

private SalesforceOAuthConnectorOAuth2Adapter defaultUnauthorizedConnector

protected FlowConstruct flowConstruct

Flow Construct

private static Logger logger

protected MuleContext muleContext

muleContext

private ObjectStore<? extends Serializable> timeObjectStore

private Boolean useDefaultRule

Public Constructors

public SalesforceOAuthConnectorOAuthManager ()

Public Methods

public SalesforceOAuthConnectorOAuth2Adapter acquireAccessToken (String userId)

Borrow an access token from the pool

Parameters
userId User identification used to borrow the access token
Returns
  • An existing authorized connector
Throws
Exception

public String authorize (Map<String, String> extraParameters, String authorizationUrl, String redirectUri)

Parameters
extraParameters
authorizationUrl
redirectUri

public SalesforceOAuthConnectorOAuth2Adapter createAccessToken (String verifier)

Create a new access token using the specified verifier and insert it into the pool

Parameters
verifier OAuth verifier
Returns
  • A newly created connector
Throws
Exception

public void destroyAccessToken (String userId, SalesforceOAuthConnectorOAuth2Adapter connector)

Parameters
userId
connector
Throws
Exception

public void dispose ()

public ObjectStore getAccessTokenObjectStore ()

Retrieves accessTokenObjectStore

public KeyedPoolableObjectFactory getAccessTokenPoolFactory ()

Retrieves accessTokenPoolFactory

public String getAccessTokenUrl ()

Retrieves accessTokenUrl

public Boolean getAllowFieldTruncationSupport ()

Retrieves allowFieldTruncationSupport

public String getAssignmentRuleId ()

Retrieves assignmentRuleId

public String getAuthorizationUrl ()

Retrieves authorizationUrl

public Integer getBatchSobjectMaxDepth ()

Retrieves batchSobjectMaxDepth

public String getClientId ()

Retrieves clientId

public String getConsumerKey ()

Retrieves consumerKey

public String getConsumerSecret ()

Retrieves consumerSecret

public SalesforceOAuthConnectorOAuth2Adapter getDefaultUnauthorizedConnector ()

Retrieves defaultUnauthorizedConnector

public String getDevkitBuild ()

Returns the build of the DevKit used to create this module

public String getDevkitVersion ()

Returns the version of the DevKit used to create this module

public FlowConstruct getFlowConstruct ()

Retrieves flowConstruct

public String getModuleName ()

Returns the user-friendly name of this module

public String getModuleVersion ()

Returns the version of this module

public MuleContext getMuleContext ()

Retrieves muleContext

public ProcessTemplate<P, SalesforceOAuthConnectorOAuth2Adapter> getProcessTemplate ()

public ObjectStore<? extends Serializable> getTimeObjectStore ()

Retrieves timeObjectStore

public Boolean getUseDefaultRule ()

Retrieves useDefaultRule

public void initialise ()

Throws
InitialisationException

public boolean isCapableOf (Capability capability)

Returns true if this module implements such capability

Parameters
capability The capability to test for
Returns
  • True if it does, false otherwise

public void releaseAccessToken (String userId, SalesforceOAuthConnectorOAuth2Adapter connector)

Parameters
userId
connector
Throws
Exception

public void setAccessTokenObjectStore (ObjectStore value)

Sets accessTokenObjectStore

Parameters
value Value to set

public void setAccessTokenUrl (String value)

Sets accessTokenUrl

Parameters
value Value to set

public void setAllowFieldTruncationSupport (Boolean value)

Sets allowFieldTruncationSupport

Parameters
value Value to set

public void setAssignmentRuleId (String value)

Sets assignmentRuleId

Parameters
value Value to set

public void setAuthorizationUrl (String value)

Sets authorizationUrl

Parameters
value Value to set

public void setBatchSobjectMaxDepth (Integer value)

Sets batchSobjectMaxDepth

Parameters
value Value to set

public void setClientId (String value)

Sets clientId

Parameters
value Value to set

public void setConsumerKey (String value)

Sets consumerKey

Parameters
value Value to set

public void setConsumerSecret (String value)

Sets consumerSecret

Parameters
value Value to set

public void setFlowConstruct (FlowConstruct flowConstruct)

Parameters
flowConstruct

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext

public void setTimeObjectStore (ObjectStore<? extends Serializable> value)

Sets timeObjectStore

Parameters
value Value to set

public void setUseDefaultRule (Boolean value)

Sets useDefaultRule

Parameters
value Value to set

public void start ()

Throws
MuleException

public void stop ()

Throws
MuleException