Nuxeo Enterprise Platform 5.4

org.nuxeo.opensocial.service.impl
Class OpenSocialServiceImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.opensocial.service.impl.OpenSocialServiceImpl
All Implemented Interfaces:
OpenSocialService, org.nuxeo.runtime.model.Adaptable, org.nuxeo.runtime.model.Component, org.nuxeo.runtime.model.Extensible

public class OpenSocialServiceImpl
extends org.nuxeo.runtime.model.DefaultComponent
implements OpenSocialService


Field Summary
static String ID
           
static org.nuxeo.runtime.model.ComponentName NAME
           
 
Constructor Summary
OpenSocialServiceImpl()
           
 
Method Summary
 void activate(org.nuxeo.runtime.model.ComponentContext context)
           
 void deactivate(org.nuxeo.runtime.model.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.
 ProxySelector getProxySelector()
          Returns the proxy settings if set
 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, org.nuxeo.runtime.model.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, org.nuxeo.runtime.model.ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

NAME

public static final org.nuxeo.runtime.model.ComponentName NAME
Constructor Detail

OpenSocialServiceImpl

public OpenSocialServiceImpl()
Method Detail

getInjector

public com.google.inject.Injector getInjector()

getGadgetSpecFactory

public org.apache.shindig.gadgets.GadgetSpecFactory getGadgetSpecFactory()
Description copied from interface: OpenSocialService
Returns our own gadget Spec Factory

Specified by:
getGadgetSpecFactory in interface OpenSocialService

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 org.nuxeo.runtime.model.ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class org.nuxeo.runtime.model.DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   org.nuxeo.runtime.model.ComponentInstance contributor)
Overrides:
unregisterContribution in class org.nuxeo.runtime.model.DefaultComponent

getAdapter

public <T> T getAdapter(Class<T> adapter)
Specified by:
getAdapter in interface org.nuxeo.runtime.model.Adaptable
Overrides:
getAdapter in class org.nuxeo.runtime.model.DefaultComponent

activate

public void activate(org.nuxeo.runtime.model.ComponentContext context)
              throws Exception
Specified by:
activate in interface org.nuxeo.runtime.model.Component
Overrides:
activate in class org.nuxeo.runtime.model.DefaultComponent
Throws:
Exception

deactivate

public void deactivate(org.nuxeo.runtime.model.ComponentContext arg0)
Specified by:
deactivate in interface org.nuxeo.runtime.model.Component
Overrides:
deactivate in class org.nuxeo.runtime.model.DefaultComponent

getInstance

public Object getInstance(Class<?> klass)

setInjector

public void setInjector(com.google.inject.Injector injector)
Description copied from interface: OpenSocialService
Specify the GUICE injector to user for the service

Specified by:
setInjector in interface OpenSocialService

getKeyForContainer

public String getKeyForContainer(String defaultContainer)

getProxySelector

public ProxySelector getProxySelector()
Description copied from interface: OpenSocialService
Returns the proxy settings if set

Specified by:
getProxySelector in interface OpenSocialService

setupOpenSocial

public void setupOpenSocial()
                     throws Exception
Description copied from interface: OpenSocialService
We have had to make this public because it must be called at exactly the right time the initialization sequence. This should be called BEFORE guice initialization of shindig happens.

Specified by:
setupOpenSocial in interface OpenSocialService
Throws:
Exception

getSigningStateKeyFile

public File getSigningStateKeyFile()
Description copied from interface: OpenSocialService
Returns a file handle to the base64 encoded key that is used to sign internal requests.

Specified by:
getSigningStateKeyFile in interface OpenSocialService

getPortalConfig

public PortalConfig[] getPortalConfig()
Description copied from interface: OpenSocialService
PortalConfig array that represents the contribution from the user in the opensocial xp. This is normally null.

Specified by:
getPortalConfig in interface OpenSocialService

getOAuthServices

public OAuthServiceDescriptor[] getOAuthServices()
Description copied from interface: OpenSocialService
Get a list of the configured external service providers that we want to communicate with.

Specified by:
getOAuthServices in interface OpenSocialService

getOAuthCallbackUrl

public String getOAuthCallbackUrl()
Description copied from interface: OpenSocialService
Where the Oauth "return callback" should go. This has to be configured to the name (and path) that other servers see the nuxeo instance as.

Specified by:
getOAuthCallbackUrl in interface OpenSocialService

getTrustedHosts

public String[] getTrustedHosts()
Description copied from interface: OpenSocialService
Return a list of hosts that can be considered as trusted : i.e : we can use internal sign fetch or propagate JSESSIONID

Specified by:
getTrustedHosts in interface OpenSocialService

isTrustedHost

public boolean isTrustedHost(String host)
Description copied from interface: OpenSocialService
Returns true if the given host is a trusted host, false otherwise.

Specified by:
isTrustedHost in interface OpenSocialService

getSigningStateKeyBytes

public byte[] getSigningStateKeyBytes()
Description copied from interface: OpenSocialService
Same as above, but in byte form. This is cached.

Specified by:
getSigningStateKeyBytes in interface OpenSocialService

propagateJSESSIONIDToTrustedHosts

public boolean propagateJSESSIONIDToTrustedHosts()
Description copied from interface: OpenSocialService
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.

Specified by:
propagateJSESSIONIDToTrustedHosts in interface OpenSocialService
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.