Package org.pf4j
Class PropertiesPluginDescriptorFinder
- java.lang.Object
-
- org.pf4j.PropertiesPluginDescriptorFinder
-
- All Implemented Interfaces:
PluginDescriptorFinder
public class PropertiesPluginDescriptorFinder extends java.lang.Object implements PluginDescriptorFinder
Find a plugin descriptor in a properties file (in plugin repository).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PROPERTIES_FILE_NAME
private static org.slf4j.Logger
log
static java.lang.String
PLUGIN_CLASS
static java.lang.String
PLUGIN_DEPENDENCIES
static java.lang.String
PLUGIN_DESCRIPTION
static java.lang.String
PLUGIN_ID
static java.lang.String
PLUGIN_LICENSE
static java.lang.String
PLUGIN_PROVIDER
static java.lang.String
PLUGIN_REQUIRES
static java.lang.String
PLUGIN_VERSION
protected java.lang.String
propertiesFileName
-
Constructor Summary
Constructors Constructor Description PropertiesPluginDescriptorFinder()
PropertiesPluginDescriptorFinder(java.lang.String propertiesFileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PluginDescriptor
createPluginDescriptor(java.util.Properties properties)
protected DefaultPluginDescriptor
createPluginDescriptorInstance()
PluginDescriptor
find(java.nio.file.Path pluginPath)
protected java.nio.file.Path
getPropertiesPath(java.nio.file.Path pluginPath, java.lang.String propertiesFileName)
boolean
isApplicable(java.nio.file.Path pluginPath)
Returns true if this finder is applicable to the givenPath
.protected java.util.Properties
readProperties(java.nio.file.Path pluginPath)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
DEFAULT_PROPERTIES_FILE_NAME
public static final java.lang.String DEFAULT_PROPERTIES_FILE_NAME
- See Also:
- Constant Field Values
-
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
- See Also:
- Constant Field Values
-
PLUGIN_DESCRIPTION
public static final java.lang.String PLUGIN_DESCRIPTION
- See Also:
- Constant Field Values
-
PLUGIN_CLASS
public static final java.lang.String PLUGIN_CLASS
- See Also:
- Constant Field Values
-
PLUGIN_VERSION
public static final java.lang.String PLUGIN_VERSION
- See Also:
- Constant Field Values
-
PLUGIN_PROVIDER
public static final java.lang.String PLUGIN_PROVIDER
- See Also:
- Constant Field Values
-
PLUGIN_DEPENDENCIES
public static final java.lang.String PLUGIN_DEPENDENCIES
- See Also:
- Constant Field Values
-
PLUGIN_REQUIRES
public static final java.lang.String PLUGIN_REQUIRES
- See Also:
- Constant Field Values
-
PLUGIN_LICENSE
public static final java.lang.String PLUGIN_LICENSE
- See Also:
- Constant Field Values
-
propertiesFileName
protected java.lang.String propertiesFileName
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.nio.file.Path pluginPath)
Description copied from interface:PluginDescriptorFinder
Returns true if this finder is applicable to the givenPath
.- Specified by:
isApplicable
in interfacePluginDescriptorFinder
-
find
public PluginDescriptor find(java.nio.file.Path pluginPath)
- Specified by:
find
in interfacePluginDescriptorFinder
-
readProperties
protected java.util.Properties readProperties(java.nio.file.Path pluginPath)
-
getPropertiesPath
protected java.nio.file.Path getPropertiesPath(java.nio.file.Path pluginPath, java.lang.String propertiesFileName)
-
createPluginDescriptor
protected PluginDescriptor createPluginDescriptor(java.util.Properties properties)
-
createPluginDescriptorInstance
protected DefaultPluginDescriptor createPluginDescriptorInstance()
-
-