public class OpenSocialServiceImpl extends DefaultComponent implements OpenSocialService
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static ComponentName |
NAME |
| Constructor and Description |
|---|
OpenSocialServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext arg0)
Deactivates the component.
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class
associated with this object.
|
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, unregisterExtensionpublic static final String ID
public static final ComponentName NAME
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)
Adaptablenull if
no such object can be found.getAdapter in interface AdaptablegetAdapter in class DefaultComponentadapter - the adapter class to look upnull if this object does not
have an adapter for the given classpublic void activate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void deactivate(ComponentContext arg0)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentarg0 - the runtime contextpublic void setInjector(com.google.inject.Injector injector)
OpenSocialServicesetInjector in interface OpenSocialServicepublic void setupOpenSocial()
throws Exception
OpenSocialServicesetupOpenSocial in interface OpenSocialServiceExceptionpublic 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 © 2013 Nuxeo SA. All Rights Reserved.