diff options
Diffstat (limited to 'src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java')
-rw-r--r-- | src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java b/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java index 709e22ef..d7f00c67 100644 --- a/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java +++ b/src/main/java/com/gitblit/servlet/SparkleShareInviteServlet.java @@ -19,50 +19,46 @@ import java.io.IOException; import java.text.MessageFormat;
import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gitblit.Constants;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
+import com.gitblit.dagger.DaggerServlet;
import com.gitblit.manager.IAuthenticationManager;
import com.gitblit.manager.IRepositoryManager;
-import com.gitblit.manager.IRuntimeManager;
import com.gitblit.manager.IUserManager;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.StringUtils;
+import dagger.ObjectGraph;
+
/**
* Handles requests for Sparkleshare Invites
*
* @author James Moger
*
*/
-public class SparkleShareInviteServlet extends HttpServlet {
+public class SparkleShareInviteServlet extends DaggerServlet {
private static final long serialVersionUID = 1L;
- private final IStoredSettings settings;
-
- private final IUserManager userManager;
+ private IStoredSettings settings;
- private final IAuthenticationManager authenticationManager;
+ private IUserManager userManager;
- private final IRepositoryManager repositoryManager;
+ private IAuthenticationManager authenticationManager;
- public SparkleShareInviteServlet(
- IRuntimeManager runtimeManager,
- IUserManager userManager,
- IAuthenticationManager authenticationManager,
- IRepositoryManager repositoryManager) {
+ private IRepositoryManager repositoryManager;
- super();
- this.settings = runtimeManager.getSettings();
- this.userManager = userManager;
- this.authenticationManager = authenticationManager;
- this.repositoryManager = repositoryManager;
+ @Override
+ protected void inject(ObjectGraph dagger) {
+ this.settings = dagger.get(IStoredSettings.class);
+ this.userManager = dagger.get(IUserManager.class);
+ this.authenticationManager = dagger.get(IAuthenticationManager.class);
+ this.repositoryManager = dagger.get(IRepositoryManager.class);
}
@Override
|