diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2013-10-03 16:01:16 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2013-10-03 16:01:16 +0300 |
commit | 6df8db4c34abb0fbbeddda7cee39124a53c4cdf5 (patch) | |
tree | 955d991dc934ea369a1fa4fe939bf18da18e9831 /demo/plugins/plugin1/src | |
parent | aab4e0129a722f98a70ca1b9ed1917befd31c9f0 (diff) | |
download | pf4j-6df8db4c34abb0fbbeddda7cee39124a53c4cdf5.tar.gz pf4j-6df8db4c34abb0fbbeddda7cee39124a53c4cdf5.zip |
add RuntimeMode with DEVELOPMENT and DEPLOYMENT values and working on DEVELOPMENT mode
Diffstat (limited to 'demo/plugins/plugin1/src')
-rw-r--r-- | demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java b/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java index d10d3dd..1c35259 100644 --- a/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java +++ b/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java @@ -12,9 +12,12 @@ */ package ro.fortsoft.pf4j.demo.welcome; +import org.apache.commons.lang.StringUtils; + import ro.fortsoft.pf4j.Extension; import ro.fortsoft.pf4j.Plugin; import ro.fortsoft.pf4j.PluginWrapper; +import ro.fortsoft.pf4j.RuntimeMode; import ro.fortsoft.pf4j.demo.api.Greeting; /** @@ -26,10 +29,16 @@ public class WelcomePlugin extends Plugin { super(wrapper); } + @Override public void start() { System.out.println("WelcomePlugin.start()"); + // for testing the development mode + if (RuntimeMode.DEVELOPMENT.equals(wrapper.getRuntimeMode())) { + System.out.println(StringUtils.upperCase("WelcomePlugin")); + } } + @Override public void stop() { System.out.println("WelcomePlugin.stop()"); } @@ -37,6 +46,7 @@ public class WelcomePlugin extends Plugin { @Extension public static class WelcomeGreeting implements Greeting { + @Override public String getGreeting() { return "Welcome"; } |