public abstract class AbstractOAuth2ManagerGenerator extends AbstractOAuthManagerGenerator
ACCESS_CODE_PATTERN_FIELD_NAME, AUTH_CODE_PATTERN_FIELD_NAME, AUTHORIZE_METHOD_NAME, CONSUMER_FIELD_NAME, context, ENCODING, EXPIRATION_FIELD_NAME, EXPIRATION_TIME_PATTERN_FIELD_NAME, FETCH_ACCESS_TOKEN_METHOD_NAME, GRANT_TYPE, HAS_TOKEN_EXPIRED_METHOD_NAME, MULE_CONTEXT_FIELD_NAME, OAUTH_RESTORE_ACCESS_TOKEN_CALLBACK_FIELD_NAME, OAUTH_SAVE_ACCESS_TOKEN_CALLBACK_FIELD_NAME, OAUTH_VERIFIER_FIELD_NAME, ON_NO_TOKEN_POLICY_FIELD_NAME, REFRESH_TOKEN_FIELD_NAME, REFRESH_TOKEN_PATTERN_FIELD_NAME, REQUEST_TOKEN_FIELD_NAME, REQUEST_TOKEN_SECRET_FIELD_NAME, RESET_METHOD_NAME, VERIFIER_FIELD_NAME
Constructor and Description |
---|
AbstractOAuth2ManagerGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
doGenerate(Module module,
GeneratedClass oAuthManagerClass)
Hook method to implement the custom core behaviour of the manager anything the concrete object to generate the adapter (either for OAuth1 or OAuth2)
|
protected AbstractOAuthAdapterGenerator |
getAdapterGenerator()
Returns the concrete object to generate the adapter (either for OAuth1 or OAuth2)
TODO: It must be refactored to avoid calling a generator from another generator, but this will imply adding more dependencies in the CONSUMES/PRODUCES mechanism
|
protected abstract List<Field> |
getConfigurableFields(Module module)
Returns the list of configurable fields that the generated manager must wrap when being filled from the definition parser.
|
protected TypeReference |
getExtendManagerClass()
Returns the concrete class to be used a superclass of the generated Manager (either for OAuth1 or OAuth2)
|
protected abstract OAuthCapability |
getOAuthCapability(Module module)
Given a module, returns the concrete object that represents the
OAuth2 annotation |
protected OAuthClientFactoryGenerator |
getOAuthFactoryGenerator()
Returns a factory generator to fulfil the
BaseOAuthClientFactory extends contract |
protected abstract GeneratedExpression |
wrapAccessorConnector(Module module,
Field field,
GeneratedExpression connector)
Wraps the connector to the custom strategy if applies.
|
callGenerator, consumes, generate, generateLoggerMethod, produces
authorizationCodeField, ctx, generateAccessTokenUrlField, generateAuthorizationUrlField, generateCatchAndReThrow, generateCatchAndReThrow, generateCreateConsumerMethod, generateFieldForBoolean, generateFieldForMessageProcessor, generateFieldForString, generateHasBeenAuthorizedMethod, generateInitialiseMethod, generateLoggerField, generateOAuth1AuthorizeMethod, generateOAuth2AuthorizeMethod, generateOnNoTokenPolicyField, generateProvider, generateRequestTokenUrlField, getOAuthAdapterClass, getterMethodForFieldAnnotatedWith, muleContextField, ref, ref, ref, ref, restoreAccessTokenCallbackField, saveAccessTokenCallbackField, setCtx
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldGenerate
protected TypeReference getExtendManagerClass()
AbstractOAuthManagerGenerator
getExtendManagerClass
in class AbstractOAuthManagerGenerator
protected AbstractOAuthAdapterGenerator getAdapterGenerator()
AbstractOAuthManagerGenerator
getAdapterGenerator
in class AbstractOAuthManagerGenerator
public void doGenerate(Module module, GeneratedClass oAuthManagerClass) throws GenerationException
AbstractOAuthManagerGenerator
doGenerate
in class AbstractOAuthManagerGenerator
GenerationException
protected abstract OAuthCapability getOAuthCapability(Module module)
OAuth2
annotationprotected abstract GeneratedExpression wrapAccessorConnector(Module module, Field field, GeneratedExpression connector)
module
- field
- connector
- protected abstract List<Field> getConfigurableFields(Module module)
module
- protected OAuthClientFactoryGenerator getOAuthFactoryGenerator()
BaseOAuthClientFactory
extends contractCopyright © 2010–2015 MuleSoft, Inc.. All rights reserved.