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.StringDEFAULT_PROPERTIES_FILE_NAMEprivate static org.slf4j.Loggerlogstatic java.lang.StringPLUGIN_CLASSstatic java.lang.StringPLUGIN_DEPENDENCIESstatic java.lang.StringPLUGIN_DESCRIPTIONstatic java.lang.StringPLUGIN_IDstatic java.lang.StringPLUGIN_LICENSEstatic java.lang.StringPLUGIN_PROVIDERstatic java.lang.StringPLUGIN_REQUIRESstatic java.lang.StringPLUGIN_VERSIONprotected java.lang.StringpropertiesFileName
-
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 PluginDescriptorcreatePluginDescriptor(java.util.Properties properties)protected DefaultPluginDescriptorcreatePluginDescriptorInstance()PluginDescriptorfind(java.nio.file.Path pluginPath)protected java.nio.file.PathgetPropertiesPath(java.nio.file.Path pluginPath, java.lang.String propertiesFileName)booleanisApplicable(java.nio.file.Path pluginPath)Returns true if this finder is applicable to the givenPath.protected java.util.PropertiesreadProperties(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:PluginDescriptorFinderReturns true if this finder is applicable to the givenPath.- Specified by:
isApplicablein interfacePluginDescriptorFinder
-
find
public PluginDescriptor find(java.nio.file.Path pluginPath)
- Specified by:
findin 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()
-
-