public class

FacebookConnectorOAuthManager

extends FacebookConnectorHttpCallbackAdapter
implements MuleContextAware Initialisable Capabilities MetadataAware OAuthManager<C extends OAuthAdapter> ProcessAdapter<O>
java.lang.Object
   ↳ org.mule.module.facebook.adapters.FacebookConnectorHttpCallbackAdapter
     ↳ org.mule.module.facebook.oauth.FacebookConnectorOAuthManager

Class Overview

A FacebookConnectorOAuthManager is a wrapper around FacebookConnector 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 String appId
private String appSecret
private String authorizationUrl
private FacebookConnectorOAuth2Adapter defaultUnauthorizedConnector
protected FlowConstruct flowConstruct Flow Construct
private static Logger logger
protected MuleContext muleContext muleContext
private String scope
[Expand]
Inherited Fields
From class org.mule.module.facebook.adapters.FacebookConnectorHttpCallbackAdapter
Public Constructors
FacebookConnectorOAuthManager()
Public Methods
FacebookConnectorOAuth2Adapter acquireAccessToken(String userId)
Borrow an access token from the pool
String authorize(Map<String, String> extraParameters, String authorizationUrl, String redirectUri)
FacebookConnectorOAuth2Adapter createAccessToken(String verifier)
Create a new access token using the specified verifier and insert it into the pool
void destroyAccessToken(String userId, FacebookConnectorOAuth2Adapter connector)
void dispose()
ObjectStore getAccessTokenObjectStore()
Retrieves accessTokenObjectStore
KeyedPoolableObjectFactory getAccessTokenPoolFactory()
Retrieves accessTokenPoolFactory
String getAccessTokenUrl()
Retrieves accessTokenUrl
String getAppId()
Retrieves appId
String getAppSecret()
Retrieves appSecret
String getAuthorizationUrl()
Retrieves authorizationUrl
FacebookConnectorOAuth2Adapter 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, FacebookConnectorOAuth2Adapter> getProcessTemplate()
String getScope()
Retrieves scope
void initialise()
boolean isCapableOf(Capability capability)
Returns true if this module implements such capability
void releaseAccessToken(String userId, FacebookConnectorOAuth2Adapter connector)
void setAccessTokenObjectStore(ObjectStore value)
Sets accessTokenObjectStore
void setAccessTokenUrl(String value)
Sets accessTokenUrl
void setAppId(String value)
Sets appId
void setAppSecret(String value)
Sets appSecret
void setAuthorizationUrl(String value)
Sets authorizationUrl
void setFlowConstruct(FlowConstruct flowConstruct)
void setMuleContext(MuleContext muleContext)
void setScope(String value)
Sets scope
void start()
void stop()
[Expand]
Inherited Methods
From class org.mule.module.facebook.adapters.FacebookConnectorHttpCallbackAdapter
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.module.facebook.adapter.HttpCallbackAdapter
From interface org.mule.module.facebook.basic.Capabilities
From interface org.mule.module.facebook.basic.MetadataAware
From interface org.mule.module.facebook.oauth.OAuthManager
From interface org.mule.module.facebook.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: "Facebook"

private static final String MODULE_VERSION

Constant Value: "2.2.2-SNAPSHOT"

Fields

private ObjectStore accessTokenObjectStore

private GenericKeyedObjectPool accessTokenPool

Access Token Pool

private KeyedPoolableObjectFactory accessTokenPoolFactory

Access Token Pool Factory

private String accessTokenUrl

private String appId

private String appSecret

private String authorizationUrl

private FacebookConnectorOAuth2Adapter defaultUnauthorizedConnector

protected FlowConstruct flowConstruct

Flow Construct

private static Logger logger

protected MuleContext muleContext

muleContext

private String scope

Public Constructors

public FacebookConnectorOAuthManager ()

Public Methods

public FacebookConnectorOAuth2Adapter 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 FacebookConnectorOAuth2Adapter 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, FacebookConnectorOAuth2Adapter 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 String getAppId ()

Retrieves appId

public String getAppSecret ()

Retrieves appSecret

public String getAuthorizationUrl ()

Retrieves authorizationUrl

public FacebookConnectorOAuth2Adapter 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, FacebookConnectorOAuth2Adapter> getProcessTemplate ()

public String getScope ()

Retrieves scope

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, FacebookConnectorOAuth2Adapter 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 setAppId (String value)

Sets appId

Parameters
value Value to set

public void setAppSecret (String value)

Sets appSecret

Parameters
value Value to set

public void setAuthorizationUrl (String value)

Sets authorizationUrl

Parameters
value Value to set

public void setFlowConstruct (FlowConstruct flowConstruct)

Parameters
flowConstruct

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext

public void setScope (String value)

Sets scope

Parameters
value Value to set

public void start ()

Throws
MuleException

public void stop ()

Throws
MuleException