org.jboss.seam.social
Interface MultiServicesManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
MultiServicesManagerImpl

public interface MultiServicesManager
extends Serializable

Implementation of this interface allow to manage multiple OAuth connection. The connection to service are backed by a Set to avoid null or duplicate connection. Uniqueness of a connection is based on service type and User name on the service

Author:
Antoine Sabot-Durand

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 type)
          Instantiate a new Service which become the new current service
 boolean isCurrentServiceConnected()
           
 void setCurrentService(OAuthService currentService)
          Set the current service.
 

Method Detail

getListOfServices

List<String> getListOfServices()
Returns:
Set of available service to connect to

getServices

Set<OAuthService> getServices()
Returns:
the Set of services connected

getNewService

OAuthService getNewService(String serviceName)
Instantiate a new service from a Service String name

Parameters:
serviceName - the name of the service
Returns:
the Bean of the new service

getCurrentService

OAuthService getCurrentService()
Returns:
the current service

setCurrentService

void setCurrentService(OAuthService currentService)
Set the current service. The service which is active at the moment

Parameters:
currentService -

isCurrentServiceConnected

boolean isCurrentServiceConnected()
Returns:
the status of the current service.

connectCurrentService

void connectCurrentService()
Connect the current service at the end of the OAuth process


initNewService

String initNewService(String type)
Instantiate a new Service which become the new current service

Parameters:
servType - the type of the service to Instantiate
Returns:
the authorization url to call to start the OAuth process

destroyCurrentService

void destroyCurrentService()
Disconnect the current service and remove it from Set of managed service. Reset the currentService to null



Copyright © 2011 Seam Framework. All Rights Reserved.