summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/GitblitManager.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-10 17:33:19 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-10 19:01:30 -0400
commitb2fec20f1f1081607b54b3e7dd20b12d03cef113 (patch)
tree4979033daec189d6a56c983b73478e782b7e91c9 /src/main/java/com/gitblit/manager/GitblitManager.java
parentd433fd3ab6185c2fb5eab998d1fcab4dd0940e5f (diff)
downloadgitblit-b2fec20f1f1081607b54b3e7dd20b12d03cef113.tar.gz
gitblit-b2fec20f1f1081607b54b3e7dd20b12d03cef113.zip
Improve plugin manager based on upstreamed contributions to pf4j
Diffstat (limited to 'src/main/java/com/gitblit/manager/GitblitManager.java')
-rw-r--r--src/main/java/com/gitblit/manager/GitblitManager.java76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/main/java/com/gitblit/manager/GitblitManager.java b/src/main/java/com/gitblit/manager/GitblitManager.java
index e3b6cf7d..191d7cf1 100644
--- a/src/main/java/com/gitblit/manager/GitblitManager.java
+++ b/src/main/java/com/gitblit/manager/GitblitManager.java
@@ -42,9 +42,8 @@ import org.eclipse.jgit.transport.RefSpec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import ro.fortsoft.pf4j.PluginClassLoader;
+import ro.fortsoft.pf4j.PluginState;
import ro.fortsoft.pf4j.PluginWrapper;
-import ro.fortsoft.pf4j.RuntimeMode;
import com.gitblit.Constants;
import com.gitblit.Constants.AccessPermission;
@@ -61,6 +60,7 @@ import com.gitblit.models.ForkModel;
import com.gitblit.models.GitClientApplication;
import com.gitblit.models.Mailing;
import com.gitblit.models.Metric;
+import com.gitblit.models.PluginRegistry.InstallState;
import com.gitblit.models.PluginRegistry.PluginRegistration;
import com.gitblit.models.PluginRegistry.PluginRelease;
import com.gitblit.models.ProjectModel;
@@ -1190,92 +1190,92 @@ public class GitblitManager implements IGitblit {
*/
@Override
- public <T> List<T> getExtensions(Class<T> clazz) {
- return pluginManager.getExtensions(clazz);
+ public void startPlugins() {
+ pluginManager.startPlugins();
}
@Override
- public PluginWrapper whichPlugin(Class<?> clazz) {
- return pluginManager.whichPlugin(clazz);
+ public void stopPlugins() {
+ pluginManager.stopPlugins();
}
@Override
- public boolean deletePlugin(PluginWrapper wrapper) {
- return pluginManager.deletePlugin(wrapper);
+ public List<PluginWrapper> getPlugins() {
+ return pluginManager.getPlugins();
}
@Override
- public boolean refreshRegistry() {
- return pluginManager.refreshRegistry();
+ public PluginWrapper getPlugin(String pluginId) {
+ return pluginManager.getPlugin(pluginId);
}
@Override
- public boolean installPlugin(String url) {
- return pluginManager.installPlugin(url);
+ public List<Class<?>> getExtensionClasses(String pluginId) {
+ return pluginManager.getExtensionClasses(pluginId);
}
@Override
- public boolean installPlugin(PluginRelease pv) {
- return pluginManager.installPlugin(pv);
+ public <T> List<T> getExtensions(Class<T> clazz) {
+ return pluginManager.getExtensions(clazz);
}
@Override
- public List<PluginRegistration> getRegisteredPlugins() {
- return pluginManager.getRegisteredPlugins();
+ public PluginWrapper whichPlugin(Class<?> clazz) {
+ return pluginManager.whichPlugin(clazz);
}
@Override
- public PluginRegistration lookupPlugin(String idOrName) {
- return pluginManager.lookupPlugin(idOrName);
+ public PluginState startPlugin(String pluginId) {
+ return pluginManager.startPlugin(pluginId);
}
@Override
- public PluginRelease lookupRelease(String idOrName, String version) {
- return pluginManager.lookupRelease(idOrName, version);
+ public PluginState stopPlugin(String pluginId) {
+ return pluginManager.stopPlugin(pluginId);
}
@Override
- public List<PluginWrapper> getPlugins() {
- return pluginManager.getPlugins();
+ public boolean disablePlugin(String pluginId) {
+ return pluginManager.disablePlugin(pluginId);
}
@Override
- public List<PluginWrapper> getResolvedPlugins() {
- return pluginManager.getResolvedPlugins();
+ public boolean enablePlugin(String pluginId) {
+ return pluginManager.enablePlugin(pluginId);
}
@Override
- public List<PluginWrapper> getUnresolvedPlugins() {
- return pluginManager.getUnresolvedPlugins();
+ public boolean deletePlugin(String pluginId) {
+ return pluginManager.deletePlugin(pluginId);
}
@Override
- public List<PluginWrapper> getStartedPlugins() {
- return pluginManager.getStartedPlugins();
+ public boolean refreshRegistry() {
+ return pluginManager.refreshRegistry();
}
@Override
- public void loadPlugins() {
- pluginManager.loadPlugins();
+ public boolean installPlugin(String url, boolean verifyChecksum) throws IOException {
+ return pluginManager.installPlugin(url, verifyChecksum);
}
@Override
- public void startPlugins() {
- pluginManager.startPlugins();
+ public List<PluginRegistration> getRegisteredPlugins() {
+ return pluginManager.getRegisteredPlugins();
}
@Override
- public void stopPlugins() {
- pluginManager.stopPlugins();
+ public List<PluginRegistration> getRegisteredPlugins(InstallState state) {
+ return pluginManager.getRegisteredPlugins(state);
}
@Override
- public PluginClassLoader getPluginClassLoader(String pluginId) {
- return pluginManager.getPluginClassLoader(pluginId);
+ public PluginRegistration lookupPlugin(String idOrName) {
+ return pluginManager.lookupPlugin(idOrName);
}
@Override
- public RuntimeMode getRuntimeMode() {
- return pluginManager.getRuntimeMode();
+ public PluginRelease lookupRelease(String idOrName, String version) {
+ return pluginManager.lookupRelease(idOrName, version);
}
}