Package org.pf4j
Class BasePluginRepository
java.lang.Object
org.pf4j.BasePluginRepository
- All Implemented Interfaces:
PluginRepository
- Direct Known Subclasses:
DefaultPluginRepository
,DevelopmentPluginRepository
,JarPluginRepository
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Comparator
<File> protected FileFilter
protected final Path
-
Constructor Summary
ConstructorsConstructorDescriptionBasePluginRepository
(Path pluginsRoot) BasePluginRepository
(Path pluginsRoot, FileFilter filter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
deletePluginPath
(Path pluginPath) Removes a plugin from the repository.List all plugin paths.void
setComparator
(Comparator<File> comparator) void
setFilter
(FileFilter filter)
-
Field Details
-
pluginsRoot
-
filter
-
comparator
-
-
Constructor Details
-
BasePluginRepository
-
BasePluginRepository
-
-
Method Details
-
setFilter
-
setComparator
Set aFile
Comparator
used to sort the listed files frompluginsRoot
. This comparator is used ingetPluginPaths()
method. By default is used a file comparator that returns the last modified files first. If you don't want a file comparator, then call this method withnull
. -
getPluginPaths
Description copied from interface:PluginRepository
List all plugin paths.- Specified by:
getPluginPaths
in interfacePluginRepository
- Returns:
- a list with paths
-
deletePluginPath
Description copied from interface:PluginRepository
Removes a plugin from the repository.- Specified by:
deletePluginPath
in interfacePluginRepository
- Parameters:
pluginPath
- the plugin path- Returns:
- true if deleted
-