Package com.baasbox.exception

Examples of com.baasbox.exception.AlreadyFriendsException


        }

        String friendshipRoleName = RoleDao.FRIENDS_OF_ROLE+to;
        boolean isFriend = RoleService.hasRole(from,friendshipRoleName);
        if (isFriend){
            throw new AlreadyFriendsException("User "+fromUser.getName()+ " is already a friend of "+to);
        }
        UserService.addUserToRole(fromUser.getName(),friendshipRoleName);
        ODocument toUser = UserService.getUserProfilebyUsername(to);
        return toUser;
    }
View Full Code Here

TOP

Related Classes of com.baasbox.exception.AlreadyFriendsException

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.