Package com.stoyanr.todo.model

Examples of com.stoyanr.todo.model.UserAccount


public class LoginServiceImpl extends RemoteServiceServlet implements
    LoginService {

    @Override
    public UserAccount login(String requestUri) {
        UserAccount userAccount = null;
        UserService userService = UserServiceFactory.getUserService();
        assert (userService != null);
        User user = userService.getCurrentUser();
        if (user != null) {
            String logoutUrl = userService.createLogoutURL(requestUri);
            userAccount = new UserAccount(user.getUserId(), user.getNickname(),
                user.getEmail(), true, null, logoutUrl);
        } else {
            String loginUrl = userService.createLoginURL(requestUri);
            userAccount = new UserAccount(null, null, null, false, loginUrl,
                null);
        }
        return userAccount;
    }
View Full Code Here

TOP

Related Classes of com.stoyanr.todo.model.UserAccount

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.