diff options
author | James Moger <james.moger@gitblit.com> | 2013-12-10 11:04:46 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-12-10 11:04:46 -0500 |
commit | cc47aad618137ee6481c8bc164d8074bd30fde9e (patch) | |
tree | c4eaf2da0a875cbb44ac6450404a08f86281ba37 /src/main/java/com/gitblit/servlet | |
parent | 0c0bb9c0c479b0c04e918f1dfb57e2998d0b3ecc (diff) | |
download | gitblit-cc47aad618137ee6481c8bc164d8074bd30fde9e.tar.gz gitblit-cc47aad618137ee6481c8bc164d8074bd30fde9e.zip |
Remove @Inject references because they confuse JEE containers
Change-Id: I2e4a8e7424e7c62d1e89ca62a91423fdf3e36ac8
Diffstat (limited to 'src/main/java/com/gitblit/servlet')
15 files changed, 5 insertions, 71 deletions
diff --git a/src/main/java/com/gitblit/servlet/BranchGraphServlet.java b/src/main/java/com/gitblit/servlet/BranchGraphServlet.java index 3efe60de..1f6d3a87 100644 --- a/src/main/java/com/gitblit/servlet/BranchGraphServlet.java +++ b/src/main/java/com/gitblit/servlet/BranchGraphServlet.java @@ -36,8 +36,6 @@ import java.util.Set; import java.util.TreeSet;
import javax.imageio.ImageIO;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -55,7 +53,6 @@ import org.eclipse.jgit.revwalk.RevCommit; import com.gitblit.Constants;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
-import com.gitblit.Keys.web;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
import com.gitblit.utils.JGitUtils;
@@ -67,7 +64,6 @@ import com.gitblit.utils.StringUtils; * @author James Moger
*
*/
-@Singleton
public class BranchGraphServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -85,7 +81,6 @@ public class BranchGraphServlet extends HttpServlet { private final IRepositoryManager repositoryManager;
- @Inject
public BranchGraphServlet(
IRuntimeManager runtimeManager,
IRepositoryManager repositoryManager) {
diff --git a/src/main/java/com/gitblit/servlet/DownloadZipFilter.java b/src/main/java/com/gitblit/servlet/DownloadZipFilter.java index 398121d3..30bb9cb9 100644 --- a/src/main/java/com/gitblit/servlet/DownloadZipFilter.java +++ b/src/main/java/com/gitblit/servlet/DownloadZipFilter.java @@ -15,13 +15,10 @@ */
package com.gitblit.servlet;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
-import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
@@ -33,10 +30,8 @@ import com.gitblit.models.UserModel; * @author James Moger
*
*/
-@Singleton
public class DownloadZipFilter extends AccessRestrictionFilter {
- @Inject
public DownloadZipFilter(
IRuntimeManager runtimeManager,
IAuthenticationManager authenticationManager,
diff --git a/src/main/java/com/gitblit/servlet/DownloadZipServlet.java b/src/main/java/com/gitblit/servlet/DownloadZipServlet.java index d26f73ea..437a9c26 100644 --- a/src/main/java/com/gitblit/servlet/DownloadZipServlet.java +++ b/src/main/java/com/gitblit/servlet/DownloadZipServlet.java @@ -20,8 +20,6 @@ import java.text.MessageFormat; import java.text.ParseException;
import java.util.Date;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
@@ -34,7 +32,6 @@ import org.slf4j.LoggerFactory; import com.gitblit.Constants;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
-import com.gitblit.Keys.web;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
import com.gitblit.utils.CompressionUtils;
@@ -49,7 +46,6 @@ import com.gitblit.utils.StringUtils; * @author James Moger
*
*/
-@Singleton
public class DownloadZipServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -79,7 +75,6 @@ public class DownloadZipServlet extends HttpServlet { }
}
- @Inject
public DownloadZipServlet(
IRuntimeManager runtimeManager,
IRepositoryManager repositoryManager) {
diff --git a/src/main/java/com/gitblit/servlet/EnforceAuthenticationFilter.java b/src/main/java/com/gitblit/servlet/EnforceAuthenticationFilter.java index 6655c6e1..b129c0ca 100644 --- a/src/main/java/com/gitblit/servlet/EnforceAuthenticationFilter.java +++ b/src/main/java/com/gitblit/servlet/EnforceAuthenticationFilter.java @@ -18,8 +18,6 @@ import java.io.IOException; import java.text.MessageFormat; -import javax.inject.Inject; -import javax.inject.Singleton; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -34,9 +32,8 @@ import org.slf4j.LoggerFactory; import com.gitblit.IStoredSettings; import com.gitblit.Keys; -import com.gitblit.Keys.web; -import com.gitblit.manager.IRuntimeManager; import com.gitblit.manager.IAuthenticationManager; +import com.gitblit.manager.IRuntimeManager; import com.gitblit.models.UserModel; /** @@ -47,7 +44,6 @@ import com.gitblit.models.UserModel; * @author Laurens Vrijnsen * */ -@Singleton public class EnforceAuthenticationFilter implements Filter { protected transient Logger logger = LoggerFactory.getLogger(getClass()); @@ -56,7 +52,6 @@ public class EnforceAuthenticationFilter implements Filter { private final IAuthenticationManager authenticationManager; - @Inject public EnforceAuthenticationFilter( IRuntimeManager runtimeManager, IAuthenticationManager authenticationManager) { diff --git a/src/main/java/com/gitblit/servlet/FederationServlet.java b/src/main/java/com/gitblit/servlet/FederationServlet.java index 4d3cbbe2..8d352feb 100644 --- a/src/main/java/com/gitblit/servlet/FederationServlet.java +++ b/src/main/java/com/gitblit/servlet/FederationServlet.java @@ -25,8 +25,6 @@ import java.util.List; import java.util.Map;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.http.HttpServletResponse;
import com.gitblit.Constants.FederationRequest;
@@ -52,7 +50,6 @@ import com.gitblit.utils.TimeUtils; * @author James Moger
*
*/
-@Singleton
public class FederationServlet extends JsonServlet {
private static final long serialVersionUID = 1L;
@@ -65,7 +62,6 @@ public class FederationServlet extends JsonServlet { private final IFederationManager federationManager;
- @Inject
public FederationServlet(
IRuntimeManager runtimeManager,
IUserManager userManager,
diff --git a/src/main/java/com/gitblit/servlet/GitFilter.java b/src/main/java/com/gitblit/servlet/GitFilter.java index 15facbe8..58a45ca2 100644 --- a/src/main/java/com/gitblit/servlet/GitFilter.java +++ b/src/main/java/com/gitblit/servlet/GitFilter.java @@ -17,7 +17,6 @@ package com.gitblit.servlet; import java.text.MessageFormat;
-import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import com.gitblit.Constants.AccessRestrictionType;
@@ -57,7 +56,6 @@ public class GitFilter extends AccessRestrictionFilter { private final IFederationManager federationManager;
- @Inject
public GitFilter(
IRuntimeManager runtimeManager,
IUserManager userManager,
diff --git a/src/main/java/com/gitblit/servlet/LogoServlet.java b/src/main/java/com/gitblit/servlet/LogoServlet.java index e91fad05..e39cc695 100644 --- a/src/main/java/com/gitblit/servlet/LogoServlet.java +++ b/src/main/java/com/gitblit/servlet/LogoServlet.java @@ -21,8 +21,6 @@ import java.io.IOException; import java.io.InputStream;
import java.io.OutputStream;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -30,7 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.gitblit.Keys;
-import com.gitblit.Keys.web;
import com.gitblit.manager.IRuntimeManager;
/**
@@ -39,7 +36,6 @@ import com.gitblit.manager.IRuntimeManager; * @author James Moger
*
*/
-@Singleton
public class LogoServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -48,7 +44,6 @@ public class LogoServlet extends HttpServlet { private final IRuntimeManager runtimeManager;
- @Inject
public LogoServlet(IRuntimeManager runtimeManager) {
super();
this.runtimeManager = runtimeManager;
diff --git a/src/main/java/com/gitblit/servlet/PagesFilter.java b/src/main/java/com/gitblit/servlet/PagesFilter.java index 42e7de75..fd7b10fe 100644 --- a/src/main/java/com/gitblit/servlet/PagesFilter.java +++ b/src/main/java/com/gitblit/servlet/PagesFilter.java @@ -15,15 +15,12 @@ */
package com.gitblit.servlet;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import org.eclipse.jgit.lib.Repository;
import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
-import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
@@ -34,10 +31,8 @@ import com.gitblit.models.UserModel; * @author James Moger
*
*/
-@Singleton
public class PagesFilter extends AccessRestrictionFilter {
- @Inject
public PagesFilter(IRuntimeManager runtimeManager,
IAuthenticationManager authenticationManager,
IRepositoryManager repositoryManager) {
diff --git a/src/main/java/com/gitblit/servlet/PagesServlet.java b/src/main/java/com/gitblit/servlet/PagesServlet.java index 6146f132..8b91b486 100644 --- a/src/main/java/com/gitblit/servlet/PagesServlet.java +++ b/src/main/java/com/gitblit/servlet/PagesServlet.java @@ -24,7 +24,6 @@ import java.util.Set; import java.util.TreeSet;
import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -40,7 +39,6 @@ import org.slf4j.LoggerFactory; import com.gitblit.Constants;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
-import com.gitblit.Keys.web;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
import com.gitblit.models.PathModel;
@@ -59,7 +57,6 @@ import com.gitblit.wicket.MarkupProcessor.MarkupDocument; * @author James Moger
*
*/
-@Singleton
public class PagesServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -70,7 +67,6 @@ public class PagesServlet extends HttpServlet { private final IRepositoryManager repositoryManager;
- @Inject
public PagesServlet(
IRuntimeManager runtimeManager,
IRepositoryManager repositoryManager) {
diff --git a/src/main/java/com/gitblit/servlet/RobotsTxtServlet.java b/src/main/java/com/gitblit/servlet/RobotsTxtServlet.java index c93675a0..94cc832a 100644 --- a/src/main/java/com/gitblit/servlet/RobotsTxtServlet.java +++ b/src/main/java/com/gitblit/servlet/RobotsTxtServlet.java @@ -18,16 +18,12 @@ package com.gitblit.servlet; import java.io.File;
import java.io.IOException;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gitblit.Keys;
-import com.gitblit.Keys.web;
-import com.gitblit.Keys.web.robots;
import com.gitblit.manager.IRuntimeManager;
import com.gitblit.utils.FileUtils;
@@ -37,14 +33,12 @@ import com.gitblit.utils.FileUtils; * @author James Moger
*
*/
-@Singleton
public class RobotsTxtServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private final IRuntimeManager runtimeManager;
- @Inject
public RobotsTxtServlet(IRuntimeManager runtimeManager) {
super();
this.runtimeManager = runtimeManager;
diff --git a/src/main/java/com/gitblit/servlet/RpcFilter.java b/src/main/java/com/gitblit/servlet/RpcFilter.java index f39d37d8..fc838724 100644 --- a/src/main/java/com/gitblit/servlet/RpcFilter.java +++ b/src/main/java/com/gitblit/servlet/RpcFilter.java @@ -18,8 +18,6 @@ package com.gitblit.servlet; import java.io.IOException;
import java.text.MessageFormat;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@@ -30,8 +28,8 @@ import javax.servlet.http.HttpServletResponse; import com.gitblit.Constants.RpcRequest;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
-import com.gitblit.manager.IRuntimeManager;
import com.gitblit.manager.IAuthenticationManager;
+import com.gitblit.manager.IRuntimeManager;
import com.gitblit.models.UserModel;
/**
@@ -47,14 +45,12 @@ import com.gitblit.models.UserModel; * @author James Moger
*
*/
-@Singleton
public class RpcFilter extends AuthenticationFilter {
private final IStoredSettings settings;
private final IRuntimeManager runtimeManager;
- @Inject
public RpcFilter(
IRuntimeManager runtimeManager,
IAuthenticationManager authenticationManager) {
diff --git a/src/main/java/com/gitblit/servlet/RpcServlet.java b/src/main/java/com/gitblit/servlet/RpcServlet.java index 856bd839..a5d892fe 100644 --- a/src/main/java/com/gitblit/servlet/RpcServlet.java +++ b/src/main/java/com/gitblit/servlet/RpcServlet.java @@ -23,8 +23,6 @@ import java.util.HashMap; import java.util.List;
import java.util.Map;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -55,7 +53,6 @@ import com.gitblit.utils.StringUtils; * @author James Moger
*
*/
-@Singleton
public class RpcServlet extends JsonServlet {
private static final long serialVersionUID = 1L;
@@ -66,7 +63,6 @@ public class RpcServlet extends JsonServlet { private final IGitblit gitblit;
- @Inject
public RpcServlet(IGitblit gitblit) {
super();
diff --git a/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java b/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java index 5d2532d4..709e22ef 100644 --- a/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java +++ b/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java @@ -18,8 +18,6 @@ package com.gitblit.servlet; import java.io.IOException;
import java.text.MessageFormat;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +40,6 @@ import com.gitblit.utils.StringUtils; * @author James Moger
*
*/
-@Singleton
public class SparkleShareInviteServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -55,7 +52,6 @@ public class SparkleShareInviteServlet extends HttpServlet { private final IRepositoryManager repositoryManager;
- @Inject
public SparkleShareInviteServlet(
IRuntimeManager runtimeManager,
IUserManager userManager,
diff --git a/src/main/java/com/gitblit/servlet/SyndicationFilter.java b/src/main/java/com/gitblit/servlet/SyndicationFilter.java index 7eb8af96..e4e5e1d6 100644 --- a/src/main/java/com/gitblit/servlet/SyndicationFilter.java +++ b/src/main/java/com/gitblit/servlet/SyndicationFilter.java @@ -18,8 +18,6 @@ package com.gitblit.servlet; import java.io.IOException;
import java.text.MessageFormat;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@@ -28,10 +26,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.manager.IProjectManager;
import com.gitblit.manager.IRepositoryManager;
import com.gitblit.manager.IRuntimeManager;
-import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.models.ProjectModel;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
@@ -44,14 +42,12 @@ import com.gitblit.models.UserModel; * @author James Moger
*
*/
-@Singleton
public class SyndicationFilter extends AuthenticationFilter {
private final IRuntimeManager runtimeManager;
private final IRepositoryManager repositoryManager;
private final IProjectManager projectManager;
- @Inject
public SyndicationFilter(
IRuntimeManager runtimeManager,
IAuthenticationManager authenticationManager,
diff --git a/src/main/java/com/gitblit/servlet/SyndicationServlet.java b/src/main/java/com/gitblit/servlet/SyndicationServlet.java index a35efa83..a9555f7d 100644 --- a/src/main/java/com/gitblit/servlet/SyndicationServlet.java +++ b/src/main/java/com/gitblit/servlet/SyndicationServlet.java @@ -22,8 +22,6 @@ import java.util.Collections; import java.util.List;
import java.util.Map;
-import javax.inject.Inject;
-import javax.inject.Singleton;
import javax.servlet.http.HttpServlet;
import org.eclipse.jgit.lib.ObjectId;
@@ -58,7 +56,6 @@ import com.gitblit.utils.SyndicationUtils; * @author James Moger
*
*/
-@Singleton
public class SyndicationServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@@ -71,7 +68,6 @@ public class SyndicationServlet extends HttpServlet { private final IProjectManager projectManager;
- @Inject
public SyndicationServlet(
IRuntimeManager runtimeManager,
IRepositoryManager repositoryManager,
|