Package com.mierdasoft.bowlpoolmanager.controller

Source Code of com.mierdasoft.bowlpoolmanager.controller.LoginCommand

package com.mierdasoft.bowlpoolmanager.controller;

import java.io.IOException;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

import org.bibeault.frontman.*;

public class LoginCommand implements Command
{
  @Override
  public void execute(CommandContext context)
  {
    UserService userService = UserServiceFactory.getUserService();

    try
    {
      context.redirect(userService.createLoginURL(
          context.getRequest().getPathInfo().toString()));
    }

    catch (IllegalStateException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    catch (IOException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
}
TOP

Related Classes of com.mierdasoft.bowlpoolmanager.controller.LoginCommand

TOP
Copyright © 2018 www.massapi.com. 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.