Package com.gwtplatform.carstore.shared.dto

Examples of com.gwtplatform.carstore.shared.dto.UserDto


        return userId != null;
    }

    private void removeCurrentUserLoginCookie() {
        CurrentUserDto currentUserDto = currentUserDtoProvider.get();
        UserDto userDto = currentUserDto.getUser();
        userSessionDao.removeLoggedInCookie(userDto);
    }
View Full Code Here


    @Override
    public CurrentUserDto get() {
        HttpSession session = sessionProvider.get();
        Long currentUserId = (Long) session.getAttribute(SecurityParameters.getUserSessionKey());

        UserDto userDto = null;
        if (currentUserId != null) {
            userDto = User.createDto(userDao.get(currentUserId));
        }

        boolean isLoggedIn = userDto != null;
View Full Code Here

    @Test
    public void aValidSessionShouldReturnTheCurrentUser(User user) {
        // Given
        given(httpSession.getAttribute(SecurityParameters.getUserSessionKey())).willReturn(A_USER_ID);
        given(userDao.get(A_USER_ID)).willReturn(user);
        UserDto userDto = User.createDto(user);

        // When
        CurrentUserDto currentUserDto = currentUserDtoProvider.get();

        // Then
View Full Code Here

    }

    @Override
    public void enableUserOptions(CurrentUser currentUser) {
        userOptions.setVisible(true);
        UserDto userDto = currentUser.getUser();
        name.setText(userDto.getFirstName());
    }
View Full Code Here

TOP

Related Classes of com.gwtplatform.carstore.shared.dto.UserDto

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.