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, Adaptable, Component, Extensible

public class OpenSocialServiceImpl
extends DefaultComponent
implements OpenSocialService


Field Summary
static java.lang.String ID
           
static ComponentName NAME
           
 
Constructor Summary
OpenSocialServiceImpl()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void deactivate(ComponentContext arg0)
          Deactivates the component.
<T> T
getAdapter(java.lang.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()
           
 java.lang.Object getInstance(java.lang.Class<?> klass)
           
 java.lang.String getKeyForContainer(java.lang.String defaultContainer)
          Get the symetric key for the given container
 java.lang.String getOAuthCallbackUrl()
          Where the Oauth "return callback" should go.
 java.io.File getOAuthPrivateKeyFile()
          Returns a file handle to the default private key for communicating with external resources.
 java.lang.String getOAuthPrivateKeyName()
          Returns the name of the private key.
 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.
 java.net.ProxySelector getProxySelector()
          Returns the proxy settings if set
 byte[] getSigningStateKeyBytes()
          Same as above, but in byte form.
 java.io.File getSigningStateKeyFile()
          Returns a file handle to the base64 encoded key that is used to sign internal requests.
 java.lang.String[] getTrustedHosts()
          Return a list of hosts to whom we *should* pass the users current JSESSIONID.
 void registerContribution(java.lang.Object contribution, java.lang.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(java.lang.Object contribution, java.lang.String extensionPoint, ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

NAME

public static final 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(java.lang.Object contribution,
                                 java.lang.String extensionPoint,
                                 ComponentInstance contributor)
                          throws java.lang.Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
java.lang.Exception

unregisterContribution

public void unregisterContribution(java.lang.Object contribution,
                                   java.lang.String extensionPoint,
                                   ComponentInstance contributor)
Overrides:
unregisterContribution in class DefaultComponent

getAdapter

public <T> T getAdapter(java.lang.Class<T> adapter)
Description copied from interface: Adaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
Overrides:
getAdapter in class DefaultComponent
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

activate

public void activate(ComponentContext context)
              throws java.lang.Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
java.lang.Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext arg0)
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
arg0 - the runtime context

getInstance

public java.lang.Object getInstance(java.lang.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 java.lang.String getKeyForContainer(java.lang.String defaultContainer)
Description copied from interface: OpenSocialService
Get the symetric key for the given container

Specified by:
getKeyForContainer in interface OpenSocialService
Parameters:
defaultContainer - the container name

getProxySelector

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

Specified by:
getProxySelector in interface OpenSocialService

setupOpenSocial

public void setupOpenSocial()
                     throws java.lang.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:
java.lang.Exception

getSigningStateKeyFile

public java.io.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

getOAuthPrivateKeyFile

public java.io.File getOAuthPrivateKeyFile()
Description copied from interface: OpenSocialService
Returns a file handle to the default private key for communicating with external resources.

Specified by:
getOAuthPrivateKeyFile 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 java.lang.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

getOAuthPrivateKeyName

public java.lang.String getOAuthPrivateKeyName()
Description copied from interface: OpenSocialService
Returns the name of the private key. Most service providers don't use this.

Specified by:
getOAuthPrivateKeyName in interface OpenSocialService

getTrustedHosts

public java.lang.String[] getTrustedHosts()
Description copied from interface: OpenSocialService
Return a list of hosts to whom we *should* pass the users current JSESSIONID.

Specified by:
getTrustedHosts 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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.