public class

GoogleContactsConnectorOAuth2Adapter

extends GoogleContactsConnectorProcessAdapter
implements OAuth2Adapter OAuth2Connector
java.lang.Object
   ↳ org.mule.modules.google.AbstractGoogleOAuthConnector
     ↳ org.mule.modules.google.contact.GoogleContactsConnector
       ↳ org.mule.modules.google.contact.adapters.GoogleContactsConnectorCapabilitiesAdapter
         ↳ org.mule.modules.google.contact.adapters.GoogleContactsConnectorMetadataAdapater
           ↳ org.mule.modules.google.contact.adapters.GoogleContactsConnectorLifecycleAdapter
             ↳ org.mule.modules.google.contact.adapters.GoogleContactsConnectorProcessAdapter
               ↳ org.mule.modules.google.contact.adapters.GoogleContactsConnectorOAuth2Adapter

Class Overview

A GoogleContactsConnectorOAuth2Adapter is a wrapper around GoogleContactsConnector that adds OAuth capabilites to the pojo.

Summary

[Expand]
Inherited Constants
From class org.mule.modules.google.contact.adapters.GoogleContactsConnectorMetadataAdapater
From class org.mule.modules.google.contact.GoogleContactsConnector
From class org.mule.modules.google.AbstractGoogleOAuthConnector
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
Fields
private static final Pattern ACCESS_CODE_PATTERN
private static final Pattern EXPIRATION_TIME_PATTERN
private static final Logger LOGGER
private static final Pattern REFRESH_TOKEN_PATTERN
private String accessTokenUrl
private String authorizationUrl
private Date expiration
private String name
private OAuth2Manager<OAuth2Adapter> oauthManager
private String oauthVerifier
private OnNoTokenPolicy onNoTokenPolicy
public String redirectUri
private String refreshToken
[Expand]
Inherited Fields
From class org.mule.modules.google.contact.GoogleContactsConnector
From class org.mule.modules.google.AbstractGoogleOAuthConnector
Public Constructors
GoogleContactsConnectorOAuth2Adapter(OAuth2Manager<OAuth2Adapter> oauthManager)
Public Methods
String authorize(Map<String, String> extraParameters, String authorizationUrl, String redirectUri)
void fetchAccessToken(String redirectUri)
Pattern getAccessCodePattern()
Retrieves ACCESS_CODE_PATTERN
String getAccessTokenRegex()
String getAccessTokenUrl()
Retrieves accessTokenUrl
Set<AuthorizationParameter<?>> getAuthorizationParameters()
String getAuthorizationUrl()
Retrieves authorizationUrl
String getExpirationRegex()
Pattern getExpirationTimePattern()
Retrieves EXPIRATION_TIME_PATTERN
String getName()
Retrieves name
String getOauthVerifier()
Retrieves oauthVerifier
OnNoTokenPolicy getOnNoTokenPolicy()
Retrieves onNoTokenPolicy
<P> ProcessTemplate<P, GoogleContactsConnectorCapabilitiesAdapter> getProcessTemplate()
String getRefreshToken()
Retrieves refreshToken
Pattern getRefreshTokenPattern()
Retrieves REFRESH_TOKEN_PATTERN
String getRefreshTokenRegex()
String getVerifierRegex()
void hasBeenAuthorized()
boolean hasTokenExpired()
void initialise()
void refreshAccessToken(String accessTokenId)
void reset()
void setAccessTokenUrl(String value)
Sets accessTokenUrl
void setAuthorizationUrl(String value)
Sets authorizationUrl
void setExpiration(Date value)
Sets expiration
void setName(String value)
Sets name
void setOauthVerifier(String value)
Sets oauthVerifier
void setOnNoTokenPolicy(OnNoTokenPolicy value)
Sets onNoTokenPolicy
void setRefreshToken(String value)
Sets refreshToken
[Expand]
Inherited Methods
From class org.mule.modules.google.contact.adapters.GoogleContactsConnectorProcessAdapter
From class org.mule.modules.google.contact.adapters.GoogleContactsConnectorLifecycleAdapter
From class org.mule.modules.google.contact.adapters.GoogleContactsConnectorMetadataAdapater
From class org.mule.modules.google.contact.adapters.GoogleContactsConnectorCapabilitiesAdapter
From class org.mule.modules.google.contact.GoogleContactsConnector
From class org.mule.modules.google.AbstractGoogleOAuthConnector
From class java.lang.Object
From interface org.mule.api.MetadataAware
From interface org.mule.api.NameableObject
From interface org.mule.api.NamedObject
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.devkit.ProcessAdapter
From interface org.mule.api.devkit.capability.Capabilities
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
From interface org.mule.security.oauth.OAuth2Adapter
From interface org.mule.security.oauth.OAuth2Connector
From interface org.mule.security.oauth.OAuthAdapter
From interface org.mule.security.oauth.OnNoTokenPolicyAware

Fields

private static final Pattern ACCESS_CODE_PATTERN

private static final Pattern EXPIRATION_TIME_PATTERN

private static final Logger LOGGER

private static final Pattern REFRESH_TOKEN_PATTERN

private String accessTokenUrl

private String authorizationUrl

private Date expiration

private String name

private OAuth2Manager<OAuth2Adapter> oauthManager

private String oauthVerifier

private OnNoTokenPolicy onNoTokenPolicy

public String redirectUri

private String refreshToken

Public Constructors

public GoogleContactsConnectorOAuth2Adapter (OAuth2Manager<OAuth2Adapter> oauthManager)

Parameters
oauthManager

Public Methods

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

Parameters
extraParameters
authorizationUrl
redirectUri

public void fetchAccessToken (String redirectUri)

Parameters
redirectUri
Throws
UnableToAcquireAccessTokenException

public Pattern getAccessCodePattern ()

Retrieves ACCESS_CODE_PATTERN

public String getAccessTokenRegex ()

public String getAccessTokenUrl ()

Retrieves accessTokenUrl

public Set<AuthorizationParameter<?>> getAuthorizationParameters ()

public String getAuthorizationUrl ()

Retrieves authorizationUrl

public String getExpirationRegex ()

public Pattern getExpirationTimePattern ()

Retrieves EXPIRATION_TIME_PATTERN

public String getName ()

Retrieves name

public String getOauthVerifier ()

Retrieves oauthVerifier

public OnNoTokenPolicy getOnNoTokenPolicy ()

Retrieves onNoTokenPolicy

public ProcessTemplate<P, GoogleContactsConnectorCapabilitiesAdapter> getProcessTemplate ()

public String getRefreshToken ()

Retrieves refreshToken

public Pattern getRefreshTokenPattern ()

Retrieves REFRESH_TOKEN_PATTERN

public String getRefreshTokenRegex ()

public String getVerifierRegex ()

public void hasBeenAuthorized ()

Throws
NotAuthorizedException

public boolean hasTokenExpired ()

public void initialise ()

Throws
InitialisationException

public void refreshAccessToken (String accessTokenId)

Parameters
accessTokenId
Throws
UnableToAcquireAccessTokenException

public void reset ()

public void setAccessTokenUrl (String value)

Sets accessTokenUrl

Parameters
value Value to set

public void setAuthorizationUrl (String value)

Sets authorizationUrl

Parameters
value Value to set

public void setExpiration (Date value)

Sets expiration

Parameters
value Value to set

public void setName (String value)

Sets name

Parameters
value Value to set

public void setOauthVerifier (String value)

Sets oauthVerifier

Parameters
value Value to set

public void setOnNoTokenPolicy (OnNoTokenPolicy value)

Sets onNoTokenPolicy

Parameters
value Value to set

public void setRefreshToken (String value)

Sets refreshToken

Parameters
value Value to set