public class OAuthServiceProviderRegistryImpl extends DefaultComponent implements OAuthServiceProviderRegistry
OAuthServiceProviderRegistry
. The main storage backend is a SQL Directory. Readonly
providers (contributed directly at OpenSocialService level) are managed in memory.Modifier and Type | Field and Description |
---|---|
static String |
DIRECTORY_NAME |
protected Map<String,NuxeoOAuthServiceProvider> |
inMemoryProviders |
protected static org.apache.commons.logging.Log |
log |
lastModified
Constructor and Description |
---|
OAuthServiceProviderRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected String |
getBareGadgetUri(String gadgetUri) |
protected DocumentModel |
getBestEntry(DocumentModelList entries,
String gadgetUri,
String serviceName) |
protected NuxeoOAuthServiceProvider |
getEntry(String gadgetUri,
String serviceName,
Set<String> ftFilter) |
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).
|
protected String |
mkStringIdx(String gadgetUri,
String serviceName) |
protected String |
preProcessServiceName(String serviceName) |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtension
protected static final org.apache.commons.logging.Log log
public static final String DIRECTORY_NAME
protected Map<String,NuxeoOAuthServiceProvider> inMemoryProviders
public OAuthServiceProviderRegistryImpl()
public NuxeoOAuthServiceProvider getProvider(String gadgetUri, String serviceName)
OAuthServiceProviderRegistry
getProvider
in interface OAuthServiceProviderRegistry
gadgetUri
- the gadget url (or AppId)serviceName
- the service name as defined in MakeRequestprotected String getBareGadgetUri(String gadgetUri)
protected String preProcessServiceName(String serviceName)
protected DocumentModel getBestEntry(DocumentModelList entries, String gadgetUri, String serviceName) throws PropertyException
PropertyException
protected NuxeoOAuthServiceProvider getEntry(String gadgetUri, String serviceName, Set<String> ftFilter)
protected String mkStringIdx(String gadgetUri, String serviceName)
public NuxeoOAuthServiceProvider addReadOnlyProvider(String gadgetUri, String serviceName, String consumerKey, String consumerSecret, String publicKey)
OAuthServiceProviderRegistry
addReadOnlyProvider
in interface OAuthServiceProviderRegistry
public void deleteProvider(String gadgetUri, String serviceName)
OAuthServiceProviderRegistry
deleteProvider
in interface OAuthServiceProviderRegistry
public void deleteProvider(String providerId)
OAuthServiceProviderRegistry
deleteProvider
in interface OAuthServiceProviderRegistry
public List<NuxeoOAuthServiceProvider> listProviders()
OAuthServiceProviderRegistry
listProviders
in interface OAuthServiceProviderRegistry
Copyright © 2015 Nuxeo SA. All rights reserved.