com.dtolabs.rundeck.core.resources
Class ResourceModelSourceService

java.lang.Object
  extended by com.dtolabs.rundeck.core.plugins.BaseProviderRegistryService<T>
      extended by com.dtolabs.rundeck.core.plugins.PluggableProviderRegistryService<ResourceModelSourceFactory>
          extended by com.dtolabs.rundeck.core.resources.ResourceModelSourceService
All Implemented Interfaces:
FrameworkSupportService, ProviderService<ResourceModelSourceFactory>, ConfigurableService<ResourceModelSource>, DescribableService, PluggableService<ResourceModelSourceFactory>

public class ResourceModelSourceService
extends PluggableProviderRegistryService<ResourceModelSourceFactory>
implements ConfigurableService<ResourceModelSource>, DescribableService

ResourceModelSourceService provides NodeSource factories


Field Summary
static java.lang.String SERVICE_NAME
           
 
Fields inherited from class com.dtolabs.rundeck.core.plugins.BaseProviderRegistryService
framework, instanceregistry, registry
 
Constructor Summary
ResourceModelSourceService(Framework framework)
           
 
Method Summary
 ResourceModelSourceFactory createProviderInstance(java.lang.Class<ResourceModelSourceFactory> clazz, java.lang.String name)
          Create provider instance from a class
 ResourceModelSourceFactory createScriptProviderInstance(ScriptPluginProvider provider)
          Return the instance for a ScriptPluginProvider definition
static ResourceModelSourceService getInstanceForFramework(Framework framework)
           
 java.lang.String getName()
          Return the name used to identify the service
 ResourceModelSource getProviderForConfiguration(java.lang.String type, java.util.Properties configuration)
          Return a ResourceModelSource of a give type with a given configuration
 ResourceModelSource getSourceForConfiguration(java.lang.String type, java.util.Properties configuration)
          Return a ResourceModelSource of a give type with a given configuration
 boolean isScriptPluggable()
          Return true if the service supports script plugins
 boolean isValidProviderClass(java.lang.Class clazz)
          Return true if the class is a valid provider class for the service
 java.util.List<ProviderIdent> listDescribableProviders()
           
 java.util.List<Description> listDescriptions()
           
 
Methods inherited from class com.dtolabs.rundeck.core.plugins.PluggableProviderRegistryService
listProviders, providerOfType
 
Methods inherited from class com.dtolabs.rundeck.core.plugins.BaseProviderRegistryService
createProviderInstanceFromType, hasValidProviderSignature, registerClass, registerInstance
 
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

ResourceModelSourceService

public ResourceModelSourceService(Framework framework)
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 ResourceModelSourceService getInstanceForFramework(Framework framework)

getSourceForConfiguration

public ResourceModelSource getSourceForConfiguration(java.lang.String type,
                                                     java.util.Properties configuration)
                                              throws ExecutionServiceException
Return a ResourceModelSource of a give type with a given configuration

Throws:
ExecutionServiceException

isValidProviderClass

public boolean isValidProviderClass(java.lang.Class clazz)
Description copied from interface: PluggableService
Return true if the class is a valid provider class for the service

Specified by:
isValidProviderClass in interface PluggableService<ResourceModelSourceFactory>
Parameters:
clazz - the class

createProviderInstance

public ResourceModelSourceFactory createProviderInstance(java.lang.Class<ResourceModelSourceFactory> clazz,
                                                         java.lang.String name)
                                                  throws PluginException,
                                                         ProviderCreationException
Description copied from interface: PluggableService
Create provider instance from a class

Specified by:
createProviderInstance in interface PluggableService<ResourceModelSourceFactory>
Parameters:
clazz - the class
name - the provider name
Throws:
PluginException
ProviderCreationException

isScriptPluggable

public boolean isScriptPluggable()
Description copied from interface: PluggableService
Return true if the service supports script plugins

Specified by:
isScriptPluggable in interface PluggableService<ResourceModelSourceFactory>

createScriptProviderInstance

public ResourceModelSourceFactory createScriptProviderInstance(ScriptPluginProvider provider)
                                                        throws PluginException
Description copied from interface: PluggableService
Return the instance for a ScriptPluginProvider definition

Specified by:
createScriptProviderInstance in interface PluggableService<ResourceModelSourceFactory>
Parameters:
provider - the script plugin provider
Throws:
PluginException

getProviderForConfiguration

public ResourceModelSource getProviderForConfiguration(java.lang.String type,
                                                       java.util.Properties configuration)
                                                throws ExecutionServiceException
Description copied from interface: ConfigurableService
Return a ResourceModelSource of a give type with a given configuration

Specified by:
getProviderForConfiguration in interface ConfigurableService<ResourceModelSource>
Throws:
ExecutionServiceException

listDescriptions

public java.util.List<Description> listDescriptions()
Specified by:
listDescriptions in interface DescribableService

listDescribableProviders

public java.util.List<ProviderIdent> listDescribableProviders()
Specified by:
listDescribableProviders in interface DescribableService