Package org.pf4j
Class DefaultPluginStatusProvider
java.lang.Object
org.pf4j.DefaultPluginStatusProvider
- All Implemented Interfaces:
PluginStatusProvider
The default implementation for
PluginStatusProvider
.
The enabled plugins are read from enabled.txt
file and
the disabled plugins are read from disabled.txt
file.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
disablePlugin
(String pluginId) Disables a plugin from being loaded.void
enablePlugin
(String pluginId) Enables a plugin that has previously been disabled.static Path
getDisabledFilePath
(Path pluginsRoot) static Path
getEnabledFilePath
(Path pluginsRoot) boolean
isPluginDisabled
(String pluginId) Checks if the plugin is disabled or not
-
Field Details
-
log
private static final org.slf4j.Logger log -
pluginsRoot
-
enabledPlugins
-
disabledPlugins
-
-
Constructor Details
-
DefaultPluginStatusProvider
-
-
Method Details
-
isPluginDisabled
Description copied from interface:PluginStatusProvider
Checks if the plugin is disabled or not- Specified by:
isPluginDisabled
in interfacePluginStatusProvider
- Parameters:
pluginId
- the unique plugin identifier, specified in its metadata- Returns:
- if the plugin is disabled or not
-
disablePlugin
Description copied from interface:PluginStatusProvider
Disables a plugin from being loaded.- Specified by:
disablePlugin
in interfacePluginStatusProvider
- Parameters:
pluginId
- the unique plugin identifier, specified in its metadata
-
enablePlugin
Description copied from interface:PluginStatusProvider
Enables a plugin that has previously been disabled.- Specified by:
enablePlugin
in interfacePluginStatusProvider
- Parameters:
pluginId
- the unique plugin identifier, specified in its metadata
-
getEnabledFilePath
-
getDisabledFilePath
-
getEnabledFilePath
-
getDisabledFilePath
-