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, unregisterExtension
public static final String ID
public static final ComponentName NAME
public com.google.inject.Injector getInjector()
public org.apache.shindig.gadgets.GadgetSpecFactory getGadgetSpecFactory()
OpenSocialService
getGadgetSpecFactory
in interface OpenSocialService
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classpublic void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext arg0)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
arg0
- the runtime contextpublic void setInjector(com.google.inject.Injector injector)
OpenSocialService
setInjector
in interface OpenSocialService
public void setupOpenSocial() throws Exception
OpenSocialService
setupOpenSocial
in interface OpenSocialService
Exception
public File getSigningStateKeyFile()
OpenSocialService
getSigningStateKeyFile
in interface OpenSocialService
public PortalConfig[] getPortalConfig()
OpenSocialService
getPortalConfig
in interface OpenSocialService
public OAuthServiceDescriptor[] getOAuthServices()
OpenSocialService
getOAuthServices
in interface OpenSocialService
public String getOAuthCallbackUrl()
OpenSocialService
getOAuthCallbackUrl
in interface OpenSocialService
public String[] getTrustedHosts()
OpenSocialService
getTrustedHosts
in interface OpenSocialService
public boolean isTrustedHost(String host)
OpenSocialService
true
if the given host is a trusted host, false
otherwise.isTrustedHost
in interface OpenSocialService
public byte[] getSigningStateKeyBytes()
OpenSocialService
getSigningStateKeyBytes
in interface OpenSocialService
public boolean propagateJSESSIONIDToTrustedHosts()
OpenSocialService
propagateJSESSIONIDToTrustedHosts
in interface OpenSocialService
Copyright © 2015 Nuxeo SA. All rights reserved.