Examples of UserToFollowNotExistsException


Examples of com.baasbox.exception.UserToFollowNotExistsException

        OUser fromUser = UserService.getOUserByUsername(from);
        if (fromUser == null){
            throw new UserNotFoundException("User "+from+" does not exists");
        }
        if (!UserService.exists(to)){
            throw new UserToFollowNotExistsException("User "+to+" does not exists");
        }
        String friendshipName = RoleDao.FRIENDS_OF_ROLE+to;
        boolean areFriends = RoleService.hasRole(fromUser.getName(),friendshipName);
        if (areFriends) {
            UserService.removeUserFromRole(fromUser.getName(),friendshipName);
View Full Code Here

Examples of com.baasbox.exception.UserToFollowNotExistsException

             throw new UserNotFoundException("User " + from + " does not exists.");
        }

        boolean exists = UserService.exists(to);
        if (!exists){
            throw new UserToFollowNotExistsException("User "+to+" does not exists.");
        }

        String friendshipRoleName = RoleDao.FRIENDS_OF_ROLE+to;
        boolean isFriend = RoleService.hasRole(from,friendshipRoleName);
        if (isFriend){
View Full Code Here
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.