org.pentaho.di.core.plugins
Class PluginFolder

java.lang.Object
  extended by org.pentaho.di.core.plugins.PluginFolder
All Implemented Interfaces:
PluginFolderInterface

public class PluginFolder
extends Object
implements PluginFolderInterface

A folder to search plugins in.

Author:
matt

Constructor Summary
PluginFolder(String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder)
           
PluginFolder(String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder, boolean searchLibDir)
           
 
Method Summary
 org.apache.commons.vfs.FileObject[] findJarFiles()
          Find all the jar files in this plugin folder
 org.apache.commons.vfs.FileObject[] findJarFiles(boolean includeLibJars)
           
 String getFolder()
           
 boolean isPluginAnnotationsFolder()
           
 boolean isPluginXmlFolder()
           
static List<PluginFolderInterface> populateFolders(String xmlSubfolder)
          Create a list of plugin folders based on the specified xml sub folder
 void setFolder(String folder)
           
 void setPluginAnnotationsFolder(boolean pluginAnnotationsFolder)
           
 void setPluginXmlFolder(boolean pluginXmlFolder)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginFolder

public PluginFolder(String folder,
                    boolean pluginXmlFolder,
                    boolean pluginAnnotationsFolder)
Parameters:
folder - The folder location
pluginXmlFolder - set to true if the folder needs to be searched for plugin.xml appearances
pluginAnnotationsFolder - set to true if the folder needs to be searched for jar files with plugin annotations

PluginFolder

public PluginFolder(String folder,
                    boolean pluginXmlFolder,
                    boolean pluginAnnotationsFolder,
                    boolean searchLibDir)
Parameters:
folder - The folder location
pluginXmlFolder - set to true if the folder needs to be searched for plugin.xml appearances
pluginAnnotationsFolder - set to true if the folder needs to be searched for jar files with plugin annotations
searchLibDir - look inside the plugins lib dir for additional plugins
Method Detail

toString

public String toString()
Overrides:
toString in class Object

populateFolders

public static List<PluginFolderInterface> populateFolders(String xmlSubfolder)
Create a list of plugin folders based on the specified xml sub folder

Parameters:
xmlSubfolder - the sub-folder to consider for XML plugin files or null if it's not applicable.
Returns:
The list of plugin folders found

findJarFiles

public org.apache.commons.vfs.FileObject[] findJarFiles()
                                                 throws KettleFileException
Description copied from interface: PluginFolderInterface
Find all the jar files in this plugin folder

Specified by:
findJarFiles in interface PluginFolderInterface
Returns:
The jar files
Throws:
KettleFileException - In case there is a problem reading

findJarFiles

public org.apache.commons.vfs.FileObject[] findJarFiles(boolean includeLibJars)
                                                 throws KettleFileException
Throws:
KettleFileException

getFolder

public String getFolder()
Specified by:
getFolder in interface PluginFolderInterface
Returns:
the folder

setFolder

public void setFolder(String folder)
Parameters:
folder - the folder to set

isPluginXmlFolder

public boolean isPluginXmlFolder()
Specified by:
isPluginXmlFolder in interface PluginFolderInterface
Returns:
the pluginXmlFolder

setPluginXmlFolder

public void setPluginXmlFolder(boolean pluginXmlFolder)
Parameters:
pluginXmlFolder - the pluginXmlFolder to set

isPluginAnnotationsFolder

public boolean isPluginAnnotationsFolder()
Specified by:
isPluginAnnotationsFolder in interface PluginFolderInterface
Returns:
the pluginAnnotationsFolder

setPluginAnnotationsFolder

public void setPluginAnnotationsFolder(boolean pluginAnnotationsFolder)
Parameters:
pluginAnnotationsFolder - the pluginAnnotationsFolder to set