diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2013-02-22 18:23:05 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2013-02-22 18:23:05 +0200 |
commit | e1fb59710349a43f3879de4520d860d5b5f2b142 (patch) | |
tree | 65b830fd96c10c12c89174bb31ed32639bccf55a /README.md | |
parent | 1ebca8c91a18fcf23a39e33b6a5750325c0d953f (diff) | |
download | pf4j-e1fb59710349a43f3879de4520d860d5b5f2b142.tar.gz pf4j-e1fb59710349a43f3879de4520d860d5b5f2b142.zip |
add info about enable/disable plugins
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -150,6 +150,39 @@ and in plugin respository you must have a plugin.properties file with the below For more information please see the demo sources. +Enable/Disable plugins +------------------- +In theory, it's a relation 1:N between an extension point and the extensions for this extension point. +This works well, except for when you develop multiple plugins for this extension point as different options for your clients to decide on which one to use. +In this situation you wish a possibility to disable all but one extension. +For example I have an extension point for sending mail (EmailSender interface) with two extensions: one based on Sendgrid and another +based on Amazon Simple Email Service. The first extension is located in Plugin1 and the second extension is located in Plugin2. +I want to go only with one extension (1:1 relation between extension point and extensions) and to achieve this I have two options: +1) uninstall Plugin1 or Plugin2 (remove from plugins folder pluginX.zip and pluginX folder) +2) disable Plugin1 or Plugin2 + +For option two you must create a simple file enabled.txt or disabled.txt in your plugins folder. +The content for enabled.txt is similar with: + + ######################################## + # - load only these plugins + # - add one plugin id on each line + # - put this file in plugins folder + ######################################## + welcome-plugin + +The content for disabled.txt is similar with: + + ######################################## + # - load all plugins except these + # - add one plugin id on each line + # - put this file in plugins folder + ######################################## + welcome-plugin + +All comment lines (line that start with # character) are ignored. +If a file with enabled.txt exists than disabled.txt is ignored. + Demo ------------------- I have a tiny demo application. The demo application is in demo folder. |