|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.plugins.BaseProviderRegistryService<T>
com.dtolabs.rundeck.core.plugins.PluggableProviderRegistryService<ResourceFormatParser>
com.dtolabs.rundeck.core.resources.format.ResourceFormatParserService
public class ResourceFormatParserService
ResourceFormatParserService is ...
Field Summary | |
---|---|
static java.lang.String |
SERVICE_NAME
|
Fields inherited from class com.dtolabs.rundeck.core.plugins.BaseProviderRegistryService |
---|
framework, instanceregistry, registry |
Constructor Summary | |
---|---|
ResourceFormatParserService(Framework framework)
|
Method Summary | |
---|---|
ResourceFormatParser |
createProviderInstance(java.lang.Class<ResourceFormatParser> clazz,
java.lang.String name)
Create provider instance from a class |
ResourceFormatParser |
createScriptProviderInstance(ScriptPluginProvider provider)
Return the instance for a ScriptPluginProvider definition |
java.util.List<java.lang.String> |
getBundledProviderNames()
|
static java.lang.String |
getFileExtension(java.lang.String name)
Return the file extension of the file, without ".", or null if the file name doesn't have an extension |
static ResourceFormatParserService |
getInstanceForFramework(Framework framework)
|
java.lang.String |
getName()
Return the name used to identify the service |
ResourceFormatParser |
getParserForFileExtension(java.io.File file)
Return a parser for a file, based on the file extension. |
ResourceFormatParser |
getParserForFileExtension(java.lang.String extension)
Return a parser for a file, based on the bare file extension. |
ResourceFormatParser |
getParserForFormat(java.lang.String format)
Return a parser for the exact format name |
ResourceFormatParser |
getParserForMIMEType(java.lang.String mimeType)
Return a parser for a mime type. |
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()
|
java.util.List<java.lang.String> |
listFormats()
List the available format identifiers provided by all parsers |
java.util.List<java.lang.String> |
listSupportedFileExtensions()
List the available format identifiers provided by all parsers |
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 |
---|
public static final java.lang.String SERVICE_NAME
Constructor Detail |
---|
public ResourceFormatParserService(Framework framework)
Method Detail |
---|
public java.util.List<java.lang.String> getBundledProviderNames()
public java.lang.String getName()
FrameworkSupportService
getName
in interface FrameworkSupportService
public java.util.List<java.lang.String> listFormats()
public java.util.List<java.lang.String> listSupportedFileExtensions()
public ResourceFormatParser getParserForFileExtension(java.io.File file) throws UnsupportedFormatException
file
- the file
UnsupportedFormatException
- if the file extension does not match an available parser, or if the file has
no extensionpublic static java.lang.String getFileExtension(java.lang.String name)
public ResourceFormatParser getParserForFileExtension(java.lang.String extension) throws UnsupportedFormatException
extension
- the file extension string
UnsupportedFormatException
- if the file extension does not match an available parser, or if the file has
no extensionpublic ResourceFormatParser getParserForFormat(java.lang.String format) throws UnsupportedFormatException
format
- the format name
ExecutionServiceException
- if no provider for the format exists
UnsupportedFormatException
public ResourceFormatParser getParserForMIMEType(java.lang.String mimeType) throws UnsupportedFormatException
mimeType
- the MIME type string
UnsupportedFormatException
- if no parser are available for the MIME typepublic boolean isValidProviderClass(java.lang.Class clazz)
PluggableService
isValidProviderClass
in interface PluggableService<ResourceFormatParser>
clazz
- the classpublic ResourceFormatParser createProviderInstance(java.lang.Class<ResourceFormatParser> clazz, java.lang.String name) throws PluginException, ProviderCreationException
PluggableService
createProviderInstance
in interface PluggableService<ResourceFormatParser>
clazz
- the classname
- the provider name
PluginException
ProviderCreationException
public boolean isScriptPluggable()
PluggableService
isScriptPluggable
in interface PluggableService<ResourceFormatParser>
public ResourceFormatParser createScriptProviderInstance(ScriptPluginProvider provider) throws PluginException
PluggableService
createScriptProviderInstance
in interface PluggableService<ResourceFormatParser>
provider
- the script plugin provider
PluginException
public java.util.List<ProviderIdent> listDescribableProviders()
listDescribableProviders
in interface DescribableService
public java.util.List<Description> listDescriptions()
listDescriptions
in interface DescribableService
public static ResourceFormatParserService getInstanceForFramework(Framework framework)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |