public class OpenSocialServiceImpl extends DefaultComponent implements OpenSocialService
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static ComponentName |
NAME |
protected OpenSocialDescriptor |
os |
protected String |
signingStateKeyBytes |
protected File |
signingStateKeyFile |
lastModified| Constructor and Description |
|---|
OpenSocialServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context) |
protected File |
createTempFileForAKey(String keyValue) |
void |
deactivate(ComponentContext arg0) |
<T> T |
getAdapter(Class<T> adapter) |
org.apache.shindig.gadgets.GadgetSpecFactory |
getGadgetSpecFactory()
Returns our own gadget Spec Factory
|
com.google.inject.Injector |
getInjector() |
Object |
getInstance(Class<?> klass) |
String |
getKeyForContainer(String defaultContainer) |
String |
getOAuthCallbackUrl()
Where the Oauth "return callback" should go.
|
OAuthServiceDescriptor[] |
getOAuthServices()
Get a list of the configured external service providers that we want to
communicate with.
|
PortalConfig[] |
getPortalConfig()
PortalConfig array that represents the contribution from the user in the
opensocial xp.
|
byte[] |
getSigningStateKeyBytes()
Same as above, but in byte form.
|
File |
getSigningStateKeyFile()
Returns a file handle to the base64 encoded key that is used to sign
internal requests.
|
String[] |
getTrustedHosts()
Return a list of hosts that can be considered as trusted : i.e : we can
use internal sign fetch or propagate JSESSIONID
|
boolean |
isTrustedHost(String host)
Returns
true if the given host is a trusted host, false
otherwise. |
boolean |
propagateJSESSIONIDToTrustedHosts()
For communication between Shindig and Nuxeo we have 2 options : - use
Signed Fetch based on a dynamically generated shared key - propagate the
JSESSIONID
Since propagating JSESSIONID is a "hack" and requires specific code in
the gadget JS, the default is false.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
setInjector(com.google.inject.Injector injector)
Specify the GUICE injector to user for the service
|
void |
setupOpenSocial()
We have had to make this public because it must be called at exactly the
right time the initialization sequence.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionpublic static final String ID
public static final ComponentName NAME
protected File signingStateKeyFile
protected OpenSocialDescriptor os
protected String signingStateKeyBytes
public com.google.inject.Injector getInjector()
public org.apache.shindig.gadgets.GadgetSpecFactory getGadgetSpecFactory()
OpenSocialServicegetGadgetSpecFactory in interface OpenSocialServicepublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution in class DefaultComponentExceptionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic <T> T getAdapter(Class<T> adapter)
getAdapter in interface AdaptablegetAdapter in class DefaultComponentpublic void activate(ComponentContext context) throws Exception
activate in interface Componentactivate in class DefaultComponentExceptionpublic void deactivate(ComponentContext arg0)
deactivate in interface Componentdeactivate in class DefaultComponentpublic void setInjector(com.google.inject.Injector injector)
OpenSocialServicesetInjector in interface OpenSocialServicepublic void setupOpenSocial()
throws Exception
OpenSocialServicesetupOpenSocial in interface OpenSocialServiceExceptionprotected File createTempFileForAKey(String keyValue) throws IOException
IOExceptionpublic File getSigningStateKeyFile()
OpenSocialServicegetSigningStateKeyFile in interface OpenSocialServicepublic PortalConfig[] getPortalConfig()
OpenSocialServicegetPortalConfig in interface OpenSocialServicepublic OAuthServiceDescriptor[] getOAuthServices()
OpenSocialServicegetOAuthServices in interface OpenSocialServicepublic String getOAuthCallbackUrl()
OpenSocialServicegetOAuthCallbackUrl in interface OpenSocialServicepublic String[] getTrustedHosts()
OpenSocialServicegetTrustedHosts in interface OpenSocialServicepublic boolean isTrustedHost(String host)
OpenSocialServicetrue if the given host is a trusted host, false
otherwise.isTrustedHost in interface OpenSocialServicepublic byte[] getSigningStateKeyBytes()
OpenSocialServicegetSigningStateKeyBytes in interface OpenSocialServicepublic boolean propagateJSESSIONIDToTrustedHosts()
OpenSocialServicepropagateJSESSIONIDToTrustedHosts in interface OpenSocialServiceCopyright © 2019 Nuxeo SA. All rights reserved.