org.pentaho.platform.plugin.services.pluginmgr.servicemgr
Class DefaultServiceManager

java.lang.Object
  extended by org.pentaho.platform.plugin.services.pluginmgr.servicemgr.DefaultServiceManager
All Implemented Interfaces:
IServiceManager

public class DefaultServiceManager
extends Object
implements IServiceManager

The default implementation of IServiceManager

Author:
aaron

Field Summary
 Map<String,IServiceTypeManager> serviceManagerMap
           
 
Constructor Summary
DefaultServiceManager()
           
 
Method Summary
 Object getServiceBean(String serviceType, String serviceId)
          Returns an instance of a registered servicing object.
 IServiceConfig getServiceConfig(String serviceType, String serviceId)
          Gets the configuration for the requested service.
 void initServices()
          Activates the services that have been registered with the service manager.
 void registerService(IServiceConfig config)
          Registers a service with the service manager.
 void setServiceTypeManagers(Collection<IServiceTypeManager> serviceTypeManagers)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceManagerMap

public Map<String,IServiceTypeManager> serviceManagerMap
Constructor Detail

DefaultServiceManager

public DefaultServiceManager()
Method Detail

setServiceTypeManagers

public void setServiceTypeManagers(Collection<IServiceTypeManager> serviceTypeManagers)

registerService

public void registerService(IServiceConfig config)
                     throws ServiceException
Description copied from interface: IServiceManager
Registers a service with the service manager. The service may not become active until #initServices(IPentahoSession) has been called.

Specified by:
registerService in interface IServiceManager
Throws:
ServiceException

getServiceBean

public Object getServiceBean(String serviceType,
                             String serviceId)
                      throws ServiceException
Description copied from interface: IServiceManager
Returns an instance of a registered servicing object.

Specified by:
getServiceBean in interface IServiceManager
Parameters:
serviceType - the type of the service, used to lookup the correct service class
serviceId - the unique id of the service
Returns:
an instance of the servicing object
Throws:
ServiceException - if no service object can be found or there was a problem retrieving the service object

getServiceConfig

public IServiceConfig getServiceConfig(String serviceType,
                                       String serviceId)
Description copied from interface: IServiceManager
Gets the configuration for the requested service.

Specified by:
getServiceConfig in interface IServiceManager
Parameters:
serviceType - the type of the service, used to lookup the correct service class
serviceId - the unique id of the service
Returns:
configuration of the service

initServices

public void initServices()
                  throws ServiceInitializationException
Description copied from interface: IServiceManager
Activates the services that have been registered with the service manager.

Specified by:
initServices in interface IServiceManager
Throws:
ServiceInitializationException