com.dtolabs.rundeck.core.plugins
Class PluginManagerService

java.lang.Object
  extended by com.dtolabs.rundeck.core.plugins.PluginManagerService
All Implemented Interfaces:
FrameworkSupportService, ServiceProviderLoader

public class PluginManagerService
extends java.lang.Object
implements FrameworkSupportService, ServiceProviderLoader

PluginManagerService is ...


Field Summary
static java.lang.String SERVICE_NAME
           
 
Constructor Summary
PluginManagerService(java.io.File extdir, java.io.File cachedir)
          Create a PluginManagerService for the given directory and cache directory
 
Method Summary
static PluginManagerService getInstanceForExtDir(java.io.File libextDir, java.io.File cachedir)
           
static PluginManagerService getInstanceForFramework(Framework framework)
           
 java.lang.String getName()
          Return the name used to identify the service
 java.util.List<ProviderIdent> listProviders()
          List the available providers
<T> T
loadProvider(PluggableService<T> service, java.lang.String providerName)
          Create a provider instance for the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

PluginManagerService

public PluginManagerService(java.io.File extdir,
                            java.io.File cachedir)
Create a PluginManagerService for the given directory and cache directory

Parameters:
extdir -
cachedir -
Method Detail

getName

public java.lang.String getName()
Description copied from interface: FrameworkSupportService
Return the name used to identify the service

Specified by:
getName in interface FrameworkSupportService

getInstanceForFramework

public static PluginManagerService getInstanceForFramework(Framework framework)

getInstanceForExtDir

public static PluginManagerService getInstanceForExtDir(java.io.File libextDir,
                                                        java.io.File cachedir)

listProviders

public java.util.List<ProviderIdent> listProviders()
Description copied from interface: ServiceProviderLoader
List the available providers

Specified by:
listProviders in interface ServiceProviderLoader

loadProvider

public <T> T loadProvider(PluggableService<T> service,
                          java.lang.String providerName)
               throws ProviderLoaderException
Description copied from interface: ServiceProviderLoader
Create a provider instance for the service

Specified by:
loadProvider in interface ServiceProviderLoader
Parameters:
service - the service
providerName - the name of the provider to load
Returns:
the provider instance
Throws:
ProviderLoaderException - if the provider cannot be found or there is an error loading it