From 16070397b08c4b7759d9f61b9df78dc3457d6d6a Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 16 Sep 2010 20:19:11 +0200 Subject: [PATCH] added ScmWebPluginContext --- scm-web-api/pom.xml | 21 +++++++- .../java/sonia/scm/ScmWebPluginContext.java | 51 +++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 scm-web-api/src/main/java/sonia/scm/ScmWebPluginContext.java diff --git a/scm-web-api/pom.xml b/scm-web-api/pom.xml index be6363537f..d84c04c275 100644 --- a/scm-web-api/pom.xml +++ b/scm-web-api/pom.xml @@ -17,18 +17,35 @@ + + sonia.scm + scm-core + 1.0-SNAPSHOT + + com.sun.jersey jersey-core - 1.4-ea06 + ${jersey.version} com.google.inject guice - 2.0 + ${guice.version} + + + + com.google.inject.extensions + guice-servlet + ${guice.version} + + 1.4-ea06 + 2.0 + + diff --git a/scm-web-api/src/main/java/sonia/scm/ScmWebPluginContext.java b/scm-web-api/src/main/java/sonia/scm/ScmWebPluginContext.java new file mode 100644 index 0000000000..f63579a01f --- /dev/null +++ b/scm-web-api/src/main/java/sonia/scm/ScmWebPluginContext.java @@ -0,0 +1,51 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + + + +package sonia.scm; + +//~--- non-JDK imports -------------------------------------------------------- + +import sonia.scm.util.ServiceUtil; + +//~--- JDK imports ------------------------------------------------------------ + +import java.util.List; + +/** + * + * @author Sebastian Sdorra + */ +public class ScmWebPluginContext +{ + + /** + * Constructs ... + * + */ + public ScmWebPluginContext() + { + plugins = ServiceUtil.getServices(ScmWebPlugin.class); + } + + //~--- get methods ---------------------------------------------------------- + + /** + * Method description + * + * + * @return + */ + public List getPlugins() + { + return plugins; + } + + //~--- fields --------------------------------------------------------------- + + /** Field description */ + private List plugins; +}