Commits

Sebastian Sdorra  committed d21fc0a

added ScmWebPluginContext

  • Participants
  • Parent commits 86788da

Comments (0)

Files changed (2)

File scm-web-api/pom.xml

 
   <dependencies>
 
+  <dependency>
+    <groupId>sonia.scm</groupId>
+    <artifactId>scm-core</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </dependency>
+
     <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-core</artifactId>
-      <version>1.4-ea06</version>
+      <version>${jersey.version}</version>
     </dependency>
 
     <dependency>
       <groupId>com.google.inject</groupId>
       <artifactId>guice</artifactId>
-      <version>2.0</version>
+      <version>${guice.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.inject.extensions</groupId>
+      <artifactId>guice-servlet</artifactId>
+      <version>${guice.version}</version>
     </dependency>
 
   </dependencies>
 
+  <properties>
+    <jersey.version>1.4-ea06</jersey.version>
+    <guice.version>2.0</guice.version>
+  </properties>
+
 </project>

File scm-web-api/src/main/java/sonia/scm/ScmWebPluginContext.java

+/*
+ * 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<ScmWebPlugin> getPlugins()
+  {
+    return plugins;
+  }
+
+  //~--- fields ---------------------------------------------------------------
+
+  /** Field description */
+  private List<ScmWebPlugin> plugins;
+}