org.jboss.seam.social
Class MultiServicesManagerImpl

java.lang.Object
  extended by org.jboss.seam.social.MultiServicesManagerImpl
All Implemented Interfaces:
Serializable, MultiServicesManager

public class MultiServicesManagerImpl
extends Object
implements MultiServicesManager, Serializable

Default implementation of MultiServicesManager

Author:
Antoine Sabot-Durand
See Also:
Serialized Form

Constructor Summary
MultiServicesManagerImpl()
           
 
Method Summary
 void connectCurrentService()
          Connect the current service at the end of the OAuth process
 void destroyCurrentService()
          Disconnect the current service and remove it from Set of managed service.
 OAuthService getCurrentService()
           
 List<String> getListOfServices()
           
 OAuthService getNewService(String serviceName)
          Instantiate a new service from a Service String name
 Set<OAuthService> getServices()
           
 String initNewService(String servType)
          Instantiate a new Service which become the new current service
 boolean isCurrentServiceConnected()
           
 void setCurrentService(OAuthService currentService)
          Set the current service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiServicesManagerImpl

public MultiServicesManagerImpl()
Method Detail

getListOfServices

public List<String> getListOfServices()
Specified by:
getListOfServices in interface MultiServicesManager
Returns:
Set of available service to connect to

getNewService

public OAuthService getNewService(String serviceName)
Description copied from interface: MultiServicesManager
Instantiate a new service from a Service String name

Specified by:
getNewService in interface MultiServicesManager
Parameters:
serviceName - the name of the service
Returns:
the Bean of the new service

getServices

public Set<OAuthService> getServices()
Specified by:
getServices in interface MultiServicesManager
Returns:
the Set of services connected

getCurrentService

public OAuthService getCurrentService()
Specified by:
getCurrentService in interface MultiServicesManager
Returns:
the current service

setCurrentService

public void setCurrentService(OAuthService currentService)
Description copied from interface: MultiServicesManager
Set the current service. The service which is active at the moment

Specified by:
setCurrentService in interface MultiServicesManager

isCurrentServiceConnected

public boolean isCurrentServiceConnected()
Specified by:
isCurrentServiceConnected in interface MultiServicesManager
Returns:
the status of the current service.

connectCurrentService

public void connectCurrentService()
Description copied from interface: MultiServicesManager
Connect the current service at the end of the OAuth process

Specified by:
connectCurrentService in interface MultiServicesManager

initNewService

public String initNewService(String servType)
Description copied from interface: MultiServicesManager
Instantiate a new Service which become the new current service

Specified by:
initNewService in interface MultiServicesManager
Returns:
the authorization url to call to start the OAuth process

destroyCurrentService

public void destroyCurrentService()
Description copied from interface: MultiServicesManager
Disconnect the current service and remove it from Set of managed service. Reset the currentService to null

Specified by:
destroyCurrentService in interface MultiServicesManager


Copyright © 2011 Seam Framework. All Rights Reserved.