Package org.pentaho.di.core.plugins
Class Plugin
- java.lang.Object
-
- org.pentaho.di.core.plugins.Plugin
-
- All Implemented Interfaces:
Comparable<Plugin>
,PluginInterface
- Direct Known Subclasses:
SupplementalPlugin
public class Plugin extends Object implements PluginInterface, Comparable<Plugin>
This describes the plugin itself, the IDs it listens too, what libraries (jar files) it uses, the names, the i18n details, etc.- Author:
- matt
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<PluginInterface>
nullStringComparator
-
Constructor Summary
Constructors Constructor Description Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder)
Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl)
Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl, String suggestion)
Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, String classLoaderGroup, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl)
Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, String classLoaderGroup, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl, String suggestion)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pentaho.di.core.plugins.PluginInterface
getPluginProperties, merge
-
-
-
-
Field Detail
-
nullStringComparator
public static Comparator<PluginInterface> nullStringComparator
-
-
Constructor Detail
-
Plugin
public Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder)
- Parameters:
ids
-pluginType
-category
-name
-description
-imageFile
-separateClassLoaderNeeded
-nativePlugin
-classMap
-libraries
-
-
Plugin
public Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl)
- Parameters:
ids
-pluginType
-category
-name
-description
-imageFile
-separateClassLoaderNeeded
-nativePlugin
-classMap
-libraries
-
-
Plugin
public Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, String classLoaderGroup, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl)
- Parameters:
ids
-pluginType
-mainType
-category
-name
-description
-imageFile
-separateClassLoaderNeeded
-classLoaderGroup
-nativePlugin
-classMap
-libraries
-errorHelpFile
-pluginFolder
-documentationUrl
-casesUrl
-forumUrl
-
-
Plugin
public Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, String classLoaderGroup, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl, String suggestion)
- Parameters:
ids
-pluginType
-mainType
-category
-name
-description
-imageFile
-separateClassLoaderNeeded
-classLoaderGroup
-nativePlugin
-classMap
-libraries
-errorHelpFile
-pluginFolder
-documentationUrl
-casesUrl
-forumUrl
-suggestion
-
-
Plugin
public Plugin(String[] ids, Class<? extends PluginTypeInterface> pluginType, Class<?> mainType, String category, String name, String description, String imageFile, boolean separateClassLoaderNeeded, boolean nativePlugin, Map<Class<?>,String> classMap, List<String> libraries, String errorHelpFile, URL pluginFolder, String documentationUrl, String casesUrl, String forumUrl, String suggestion)
- Parameters:
ids
-pluginType
-mainType
-category
-name
-description
-imageFile
-separateClassLoaderNeeded
-nativePlugin
-classMap
-libraries
-errorHelpFile
-pluginFolder
-documentationUrl
-casesUrl
-forumUrl
-suggestion
-
-
-
Method Detail
-
compareTo
public int compareTo(Plugin o)
- Specified by:
compareTo
in interfaceComparable<Plugin>
-
matches
public boolean matches(String id)
- Specified by:
matches
in interfacePluginInterface
- Parameters:
id
- the plugin id to match- Returns:
- true if one of the ids matches the given argument. Return false if it doesn't.
-
getCategory
public String getCategory()
- Specified by:
getCategory
in interfacePluginInterface
- Returns:
- the category
-
setCategory
public void setCategory(String category)
- Parameters:
category
- the category to set
-
getName
public String getName()
- Specified by:
getName
in interfacePluginInterface
- Returns:
- the name
-
setName
public void setName(String name)
- Parameters:
name
- the name to set
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfacePluginInterface
- Returns:
- the description
-
setDescription
public void setDescription(String description)
- Parameters:
description
- the description to set
-
getIds
public String[] getIds()
- Specified by:
getIds
in interfacePluginInterface
- Returns:
- the ids
-
setIds
public void setIds(String[] ids)
- Parameters:
ids
- the ids to set
-
getPluginType
public Class<? extends PluginTypeInterface> getPluginType()
- Specified by:
getPluginType
in interfacePluginInterface
- Returns:
- the pluginType
-
setPluginType
public void setPluginType(Class<? extends PluginTypeInterface> pluginType)
- Parameters:
pluginType
- the pluginType to set
-
getImageFile
public String getImageFile()
- Specified by:
getImageFile
in interfacePluginInterface
- Returns:
- the imageFile
-
setImageFile
public void setImageFile(String imageFile)
- Specified by:
setImageFile
in interfacePluginInterface
- Parameters:
imageFile
- the imageFile to set
-
isSeparateClassLoaderNeeded
public boolean isSeparateClassLoaderNeeded()
- Specified by:
isSeparateClassLoaderNeeded
in interfacePluginInterface
- Returns:
- the separateClassLoaderNeeded
-
setSaperateClassLoaderNeeded
public void setSaperateClassLoaderNeeded(boolean separateClassLoaderNeeded)
- Parameters:
separateClassLoaderNeeded
- the separateClassLoaderNeeded to set
-
isNativePlugin
public boolean isNativePlugin()
- Specified by:
isNativePlugin
in interfacePluginInterface
- Returns:
- the nativePlugin
-
setNativePlugin
public void setNativePlugin(boolean nativePlugin)
- Parameters:
nativePlugin
- the nativePlugin to set
-
getClassMap
public Map<Class<?>,String> getClassMap()
- Specified by:
getClassMap
in interfacePluginInterface
- Returns:
- the classMap
-
setClassMap
public void setClassMap(Map<Class<?>,String> classMap)
- Parameters:
classMap
- the classMap to set
-
getLibraries
public List<String> getLibraries()
- Specified by:
getLibraries
in interfacePluginInterface
- Returns:
- the libraries
-
setLibraries
public void setLibraries(List<String> libraries)
- Parameters:
libraries
- the libraries to set
-
getErrorHelpFile
public String getErrorHelpFile()
- Specified by:
getErrorHelpFile
in interfacePluginInterface
- Returns:
- the errorHelpFile
-
setErrorHelpFile
public void setErrorHelpFile(String errorHelpFile)
- Specified by:
setErrorHelpFile
in interfacePluginInterface
- Parameters:
errorHelpFile
- the errorHelpFile to set
-
getMainType
public Class<?> getMainType()
- Specified by:
getMainType
in interfacePluginInterface
- Returns:
- The main class assigned to this Plugin.
-
getPluginDirectory
public URL getPluginDirectory()
- Specified by:
getPluginDirectory
in interfacePluginInterface
-
getDocumentationUrl
public String getDocumentationUrl()
- Specified by:
getDocumentationUrl
in interfacePluginInterface
- Returns:
- the documentationUrl
-
setDocumentationUrl
public void setDocumentationUrl(String documentationUrl)
- Specified by:
setDocumentationUrl
in interfacePluginInterface
- Parameters:
documentationUrl
- the documentationUrl to set
-
getCasesUrl
public String getCasesUrl()
- Specified by:
getCasesUrl
in interfacePluginInterface
- Returns:
- the casesUrl
-
setCasesUrl
public void setCasesUrl(String casesUrl)
- Specified by:
setCasesUrl
in interfacePluginInterface
- Parameters:
casesUrl
- the casesUrl to set
-
getForumUrl
public String getForumUrl()
- Specified by:
getForumUrl
in interfacePluginInterface
- Returns:
- the forum URL
-
setForumUrl
public void setForumUrl(String forumUrl)
- Specified by:
setForumUrl
in interfacePluginInterface
- Parameters:
forumUrl
- the forum URL to set
-
getClassLoaderGroup
public String getClassLoaderGroup()
- Specified by:
getClassLoaderGroup
in interfacePluginInterface
- Returns:
- The group to which this class loader belongs. Returns null if the plugin does not belong to a group (the default)
-
setSuggestion
public void setSuggestion(String suggestion)
- Specified by:
setSuggestion
in interfacePluginInterface
-
getSuggestion
public String getSuggestion()
- Specified by:
getSuggestion
in interfacePluginInterface
-
setClassLoaderGroup
public void setClassLoaderGroup(String classLoaderGroup)
- Specified by:
setClassLoaderGroup
in interfacePluginInterface
- Parameters:
classLoaderGroup
- The group to which this class loader belongs. Set to null if the plugin does not belong to a group (the default)
-
-