diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2017-09-27 21:36:29 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2017-09-27 21:36:29 +0300 |
commit | da346cf715b98560120fd2b3c531199f3ff58d37 (patch) | |
tree | dd7e065decdcdfe981fb276d33b086032cfe9a89 /pf4j/src | |
parent | bb7e2a7ce7c5d5f3e3c8267b57bf5068f2bbf1c3 (diff) | |
download | pf4j-da346cf715b98560120fd2b3c531199f3ff58d37.tar.gz pf4j-da346cf715b98560120fd2b3c531199f3ff58d37.zip |
Open a new extension (protected method) point in PropertiesPluginDescriptorFinder
Diffstat (limited to 'pf4j/src')
-rw-r--r-- | pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java b/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java index 0391bce..31d4d53 100644 --- a/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java +++ b/pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java @@ -55,10 +55,10 @@ public class PropertiesPluginDescriptorFinder implements PluginDescriptorFinder } protected Properties readProperties(Path pluginPath) throws PluginException { - Path propertiesPath = pluginPath.resolve(Paths.get(propertiesFileName)); + Path propertiesPath = getPropertiesPath(pluginPath, propertiesFileName); log.debug("Lookup plugin descriptor in '{}'", propertiesPath); if (Files.notExists(propertiesPath)) { - throw new PluginException("Cannot find '{}' path", pluginPath); + throw new PluginException("Cannot find '{}' path", propertiesPath); } Properties properties = new Properties(); @@ -71,6 +71,10 @@ public class PropertiesPluginDescriptorFinder implements PluginDescriptorFinder return properties; } + protected Path getPropertiesPath(Path pluginPath, String propertiesFileName) throws PluginException { + return pluginPath.resolve(Paths.get(propertiesFileName)); + } + protected PluginDescriptor createPluginDescriptor(Properties properties) { PluginDescriptor pluginDescriptor = createPluginDescriptorInstance(); |