Package org.pentaho.di.core.plugins
Class PluginFolder
- java.lang.Object
-
- 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
Constructors Constructor Description PluginFolder(String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder)
PluginFolder(String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder, boolean searchLibDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
org.apache.commons.vfs2.FileObject[]
findJarFiles()
Find all the jar files in this plugin folderorg.apache.commons.vfs2.FileObject[]
findJarFiles(boolean includeLibJars)
String
getFolder()
int
hashCode()
boolean
isPluginAnnotationsFolder()
boolean
isPluginXmlFolder()
static List<PluginFolderInterface>
populateFolders(String xmlSubfolder)
Create a list of plugin folders based on the specified xml sub foldervoid
setFolder(String folder)
void
setPluginAnnotationsFolder(boolean pluginAnnotationsFolder)
void
setPluginXmlFolder(boolean pluginXmlFolder)
String
toString()
-
-
-
Constructor Detail
-
PluginFolder
public PluginFolder(String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder)
- Parameters:
folder
- The folder locationpluginXmlFolder
- set to true if the folder needs to be searched for plugin.xml appearancespluginAnnotationsFolder
- 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 locationpluginXmlFolder
- set to true if the folder needs to be searched for plugin.xml appearancespluginAnnotationsFolder
- set to true if the folder needs to be searched for jar files with plugin annotationssearchLibDir
- look inside the plugins lib dir for additional plugins
-
-
Method Detail
-
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.vfs2.FileObject[] findJarFiles() throws KettleFileException
Description copied from interface:PluginFolderInterface
Find all the jar files in this plugin folder- Specified by:
findJarFiles
in interfacePluginFolderInterface
- Returns:
- The jar files
- Throws:
KettleFileException
- In case there is a problem reading
-
findJarFiles
public org.apache.commons.vfs2.FileObject[] findJarFiles(boolean includeLibJars) throws KettleFileException
- Throws:
KettleFileException
-
getFolder
public String getFolder()
- Specified by:
getFolder
in interfacePluginFolderInterface
- Returns:
- the folder
-
setFolder
public void setFolder(String folder)
- Parameters:
folder
- the folder to set
-
isPluginXmlFolder
public boolean isPluginXmlFolder()
- Specified by:
isPluginXmlFolder
in interfacePluginFolderInterface
- Returns:
- the pluginXmlFolder
-
setPluginXmlFolder
public void setPluginXmlFolder(boolean pluginXmlFolder)
- Parameters:
pluginXmlFolder
- the pluginXmlFolder to set
-
isPluginAnnotationsFolder
public boolean isPluginAnnotationsFolder()
- Specified by:
isPluginAnnotationsFolder
in interfacePluginFolderInterface
- Returns:
- the pluginAnnotationsFolder
-
setPluginAnnotationsFolder
public void setPluginAnnotationsFolder(boolean pluginAnnotationsFolder)
- Parameters:
pluginAnnotationsFolder
- the pluginAnnotationsFolder to set
-
-