public class PluginDescriptor extends Object
PluginDescriptor
provide access to all meta information of
a nutch-plugin, as well to the internationalizable resources and the plugin
own classloader. There are meta information about Plugin
,
ExtensionPoint
and Extension
. To provide
access to the meta data of a plugin via a descriptor allow a lazy loading
mechanism.Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
PluginDescriptor(String pId,
String pVersion,
String pName,
String pProviderName,
String pPluginclazz,
String pPath,
org.apache.hadoop.conf.Configuration conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDependency(String pId)
Adds a dependency
|
void |
addExportedLibRelative(String pLibPath)
Adds a exported library with a relative path to the plugin directory.
|
void |
addExtension(Extension pExtension)
Adds a extension.
|
void |
addExtensionPoint(ExtensionPoint extensionPoint)
Adds a extension point.
|
void |
addNotExportedLibRelative(String pLibPath)
Adds a exported library with a relative path to the plugin directory.
|
PluginClassLoader |
getClassLoader()
Returns a cached classloader for a plugin.
|
String[] |
getDependencies()
Returns a array of plugin ids.
|
URL[] |
getExportedLibUrls()
Returns a array exported librareis as URLs
|
Extension[] |
getExtensions()
Returns an array of extensions.
|
ExtensionPoint[] |
getExtenstionPoints()
Returns a array of extension points.
|
String |
getName()
Returns the name of the plugin.
|
URL[] |
getNotExportedLibUrls()
Returns a array of libraries as URLs that are not exported by the plugin.
|
String |
getPluginClass()
Returns the fully qualified name of the class which implements the abstarct
Plugin class. |
String |
getPluginId()
Returns the unique identifier of the plug-in or
null . |
String |
getPluginPath()
Returns the directory path of the plugin.
|
String |
getProviderName() |
String |
getResourceString(String pKey,
Locale pLocale)
Returns a I18N'd resource string.
|
String |
getVersion() |
public String getName()
public String getPluginClass()
Plugin
class.null
.public String getPluginId()
null
.public Extension[] getExtensions()
public void addExtension(Extension pExtension)
pExtension
- public void addExtensionPoint(ExtensionPoint extensionPoint)
extensionPoint
- public ExtensionPoint[] getExtenstionPoints()
public String[] getDependencies()
public void addDependency(String pId)
pId
- id of the dependent pluginpublic void addExportedLibRelative(String pLibPath) throws MalformedURLException
pLibPath
- MalformedURLException
public String getPluginPath()
public URL[] getExportedLibUrls()
public void addNotExportedLibRelative(String pLibPath) throws MalformedURLException
pLibPath
- MalformedURLException
public URL[] getNotExportedLibUrls()
public PluginClassLoader getClassLoader()
public String getResourceString(String pKey, Locale pLocale) throws IOException
pKey
- pLocale
- IOException
public String getProviderName()
public String getVersion()
Copyright © 2014 The Apache Software Foundation