diff options
author | James Moger <james.moger@gitblit.com> | 2014-07-03 16:07:16 -0600 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-07-03 16:07:16 -0600 |
commit | a40cbcfc4fab2ca16304c7393a68fe95a9322edc (patch) | |
tree | ecb5f0b4ab95bf9af2841578d6a48a5b5425eef5 /src/main/java/com/gitblit/servlet/PagesServlet.java | |
parent | dbcf2f83b82cd3a2b74ee4090e11307485526e1f (diff) | |
parent | 9991de4d121dc6124d40a10d86d879b17b39de68 (diff) | |
download | gitblit-a40cbcfc4fab2ca16304c7393a68fe95a9322edc.tar.gz gitblit-a40cbcfc4fab2ca16304c7393a68fe95a9322edc.zip |
Merged #80 "Replace Dagger with Guice"
Diffstat (limited to 'src/main/java/com/gitblit/servlet/PagesServlet.java')
-rw-r--r-- | src/main/java/com/gitblit/servlet/PagesServlet.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/servlet/PagesServlet.java b/src/main/java/com/gitblit/servlet/PagesServlet.java index f578f86f..ad34b3ca 100644 --- a/src/main/java/com/gitblit/servlet/PagesServlet.java +++ b/src/main/java/com/gitblit/servlet/PagesServlet.java @@ -15,10 +15,14 @@ */
package com.gitblit.servlet;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gitblit.Constants;
+import com.gitblit.manager.IRepositoryManager;
+import com.gitblit.manager.IRuntimeManager;
/**
* Serves the content of a gh-pages branch.
@@ -26,6 +30,7 @@ import com.gitblit.Constants; * @author James Moger
*
*/
+@Singleton
public class PagesServlet extends RawServlet {
private static final long serialVersionUID = 1L;
@@ -46,6 +51,14 @@ public class PagesServlet extends RawServlet { return baseURL + Constants.PAGES + repository + "/" + (path == null ? "" : ("/" + path));
}
+ @Inject
+ public PagesServlet(
+ IRuntimeManager runtimeManager,
+ IRepositoryManager repositoryManager) {
+
+ super(runtimeManager, repositoryManager);
+ }
+
@Override
protected String getBranch(String repository, HttpServletRequest request) {
return "gh-pages";
|