Package com.google.livingstories.server.dataservices

Examples of com.google.livingstories.server.dataservices.UserLoginService


import javax.servlet.http.HttpServletResponse;

public class SubscribeServlet extends HttpServlet {
  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    UserLoginService userLoginService = DataImplFactory.getUserLoginService();
    UserDataService userDataService = DataImplFactory.getUserDataService();
   
    if (!userLoginService.isUserLoggedIn()) {
      // User needs to login first
      resp.sendRedirect(userLoginService.createLoginUrl(req.getRequestURL().toString()));
      return;
    }
   
    String livingStoryId = req.getParameter("livingStoryId");
    if (livingStoryId != null) {
      Locale locale = req.getLocale();
      userDataService.setEmailSubscription(userLoginService.getUserId(),
          Long.valueOf(livingStoryId), true, locale.getLanguage() + "_" + locale.getCountry());
    }

    String lspUrl = req.getParameter("lspUrl");
    if (lspUrl != null) {
View Full Code Here

TOP

Related Classes of com.google.livingstories.server.dataservices.UserLoginService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.