aboutsummaryrefslogtreecommitdiffstats
path: root/demo/plugins/plugin1
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2023-01-15 19:20:36 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2023-01-15 19:20:36 +0200
commit5fae38427d1985468b018775a956c290dc214420 (patch)
treebd5ceaf70a5116d230d89d01370e1e6731db92ab /demo/plugins/plugin1
parentde63736b13a71c227c1dec95e8e39c95a3962870 (diff)
downloadpf4j-5fae38427d1985468b018775a956c290dc214420.tar.gz
pf4j-5fae38427d1985468b018775a956c290dc214420.zip
Relax Plugin construction (remove dependency on PluginWrapper)
Diffstat (limited to 'demo/plugins/plugin1')
-rw-r--r--demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java b/demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java
index a0cecab..3064902 100644
--- a/demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java
+++ b/demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java
@@ -16,27 +16,26 @@
package org.pf4j.demo.welcome;
import org.apache.commons.lang.StringUtils;
-
-import org.pf4j.PluginWrapper;
+import org.pf4j.Extension;
import org.pf4j.RuntimeMode;
+import org.pf4j.demo.api.DemoPlugin;
import org.pf4j.demo.api.Greeting;
-import org.pf4j.Extension;
-import org.pf4j.Plugin;
+import org.pf4j.demo.api.PluginContext;
/**
* @author Decebal Suiu
*/
-public class WelcomePlugin extends Plugin {
+public class WelcomePlugin extends DemoPlugin {
- public WelcomePlugin(PluginWrapper wrapper) {
- super(wrapper);
+ public WelcomePlugin(PluginContext context) {
+ super(context);
}
@Override
public void start() {
log.info("WelcomePlugin.start()");
// for testing the development mode
- if (RuntimeMode.DEVELOPMENT.equals(wrapper.getRuntimeMode())) {
+ if (RuntimeMode.DEVELOPMENT.equals(context.getRuntimeMode())) {
log.info(StringUtils.upperCase("WelcomePlugin"));
}
}