Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.oauth.providers
Class OAuthServiceProviderRegistryImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.oauth.providers.OAuthServiceProviderRegistryImpl
All Implemented Interfaces:
OAuthServiceProviderRegistry, Adaptable, Component, Extensible

public class OAuthServiceProviderRegistryImpl
extends DefaultComponent
implements OAuthServiceProviderRegistry

Implementation of the OAuthServiceProviderRegistry. The main storage backend is a SQL Directory. Readonly providers (contributed directly at OpenSocialService level) are managed in memory.

Author:
tiry

Field Summary
static String DIRECTORY_NAME
           
 
Constructor Summary
OAuthServiceProviderRegistryImpl()
           
 
Method Summary
 NuxeoOAuthServiceProvider addReadOnlyProvider(String gadgetUri, String serviceName, String consumerKey, String consumerSecret, String publicKey)
          This method is here for compatibility reasons.
 void deleteProvider(String providerId)
          Deletes a provider.
 void deleteProvider(String gadgetUri, String serviceName)
          Deletes a provider.
 NuxeoOAuthServiceProvider getProvider(String gadgetUri, String serviceName)
          Select the best provider given.
 List<NuxeoOAuthServiceProvider> listProviders()
          Return the list of all know providers (both readonly and editable ones).
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, applicationStarted, deactivate, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY_NAME

public static final String DIRECTORY_NAME
See Also:
Constant Field Values
Constructor Detail

OAuthServiceProviderRegistryImpl

public OAuthServiceProviderRegistryImpl()
Method Detail

getProvider

public NuxeoOAuthServiceProvider getProvider(String gadgetUri,
                                             String serviceName)
Description copied from interface: OAuthServiceProviderRegistry
Select the best provider given.

Specified by:
getProvider in interface OAuthServiceProviderRegistry
Parameters:
gadgetUri - the gadget url (or AppId)
serviceName - the service name as defined in MakeRequest

addReadOnlyProvider

public NuxeoOAuthServiceProvider addReadOnlyProvider(String gadgetUri,
                                                     String serviceName,
                                                     String consumerKey,
                                                     String consumerSecret,
                                                     String publicKey)
Description copied from interface: OAuthServiceProviderRegistry
This method is here for compatibility reasons. Providers that are directly contributed to the OpenSocialService are forwarded to the new centralized service.

Specified by:
addReadOnlyProvider in interface OAuthServiceProviderRegistry

deleteProvider

public void deleteProvider(String gadgetUri,
                           String serviceName)
Description copied from interface: OAuthServiceProviderRegistry
Deletes a provider.

Specified by:
deleteProvider in interface OAuthServiceProviderRegistry

deleteProvider

public void deleteProvider(String providerId)
Description copied from interface: OAuthServiceProviderRegistry
Deletes a provider.

Specified by:
deleteProvider in interface OAuthServiceProviderRegistry

listProviders

public List<NuxeoOAuthServiceProvider> listProviders()
Description copied from interface: OAuthServiceProviderRegistry
Return the list of all know providers (both readonly and editable ones).

Specified by:
listProviders in interface OAuthServiceProviderRegistry

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.