org.pentaho.di.core.plugins
Class BasePluginType

java.lang.Object
  extended by org.pentaho.di.core.plugins.BasePluginType
All Implemented Interfaces:
PluginTypeInterface
Direct Known Subclasses:
DatabasePluginType, ImportRulePluginType, JobEntryPluginType, KettleLifecyclePluginType, LifecyclePluginType, PartitionerPluginType, RepositoryPluginType, SpoonPluginType, StepPluginType

public abstract class BasePluginType
extends Object
implements PluginTypeInterface


Constructor Summary
BasePluginType(Class<? extends Annotation> pluginType)
           
BasePluginType(Class<? extends Annotation> pluginType, String id, String name)
           
 
Method Summary
 void addObjectType(Class<?> clz, String xmlNodeName)
          Register an additional class type to be managed by the plugin system.
 Map<Class<?>,String> getAdditionalRuntimeObjectTypes()
           
 String getId()
           
 String getName()
           
 List<PluginFolderInterface> getPluginFolders()
           
 void handlePluginAnnotation(Class<?> clazz, Annotation annotation, List<String> libraries, boolean nativePluginType, URL pluginFolder)
          Handle an annotated plugin
 void registerCustom(Class<?> clazz, String category, String id, String name, String description, String image)
          This method allows for custom registration of plugins that are on the main classpath.
 void searchPlugins()
          Let's put in code here to search for the step plugins..
 void setId(String id)
           
 void setName(String name)
           
 void setPluginFolders(List<PluginFolderInterface> pluginFolders)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasePluginType

public BasePluginType(Class<? extends Annotation> pluginType)

BasePluginType

public BasePluginType(Class<? extends Annotation> pluginType,
                      String id,
                      String name)
Parameters:
id - The plugin type ID
name - the name of the plugin
Method Detail

getAdditionalRuntimeObjectTypes

public Map<Class<?>,String> getAdditionalRuntimeObjectTypes()

addObjectType

public void addObjectType(Class<?> clz,
                          String xmlNodeName)
Description copied from interface: PluginTypeInterface
Register an additional class type to be managed by the plugin system.

Specified by:
addObjectType in interface PluginTypeInterface
Parameters:
clz - category class, usually an interface
xmlNodeName - xml node to search for a class name

toString

public String toString()
Overrides:
toString in class Object

searchPlugins

public void searchPlugins()
                   throws KettlePluginException
Let's put in code here to search for the step plugins..

Specified by:
searchPlugins in interface PluginTypeInterface
Throws:
KettlePluginException

getId

public String getId()
Specified by:
getId in interface PluginTypeInterface
Returns:
the id

setId

public void setId(String id)
Parameters:
id - the id to set

getName

public String getName()
Specified by:
getName in interface PluginTypeInterface
Returns:
the name

setName

public void setName(String name)
Parameters:
name - the name to set

getPluginFolders

public List<PluginFolderInterface> getPluginFolders()
Specified by:
getPluginFolders in interface PluginTypeInterface
Returns:
the pluginFolders

setPluginFolders

public void setPluginFolders(List<PluginFolderInterface> pluginFolders)
Parameters:
pluginFolders - the pluginFolders to set

registerCustom

public void registerCustom(Class<?> clazz,
                           String category,
                           String id,
                           String name,
                           String description,
                           String image)
                    throws KettlePluginException
This method allows for custom registration of plugins that are on the main classpath. This was originally created so that test environments could register test plugins programmatically.

Parameters:
clazz - the plugin implementation to register
category - the category of the plugin
id - the id for the plugin
name - the name for the plugin
description - the description for the plugin
image - the image for the plugin
Throws:
KettlePluginException

handlePluginAnnotation

public void handlePluginAnnotation(Class<?> clazz,
                                   Annotation annotation,
                                   List<String> libraries,
                                   boolean nativePluginType,
                                   URL pluginFolder)
                            throws KettlePluginException
Handle an annotated plugin

Specified by:
handlePluginAnnotation in interface PluginTypeInterface
Parameters:
clazz - The class to use
annotation - The annotation to get information from
libraries - The libraries to add
nativePluginType - Is this a native plugin?
pluginFolder - The plugin folder to use
Throws:
KettlePluginException