Class UserFollowsManager


  • public class UserFollowsManager
    extends Object
    Manager class used to deal with issues related to User-Follows process.
    Since:
    6.1.0
    Version:
    $Revision: 20509 $ $Date: 2017-09-11 16:18:14 -0300 (Mon, 11 Sep 2017) $
    • Field Detail

      • ACTION_TYPE_WHO_I_FOLLOW

        public static final String ACTION_TYPE_WHO_I_FOLLOW
        Param that defines a "Who I Follow" action
        See Also:
        Constant Field Values
      • ACTION_TYPE_WHO_FOLLOWS_ME

        public static final String ACTION_TYPE_WHO_FOLLOWS_ME
        Param that defines a "Who Follows me" action
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static UserFollowsManager getInstance()
        Singleton method that retrieves a instance of this class.
        Returns:
        an instance of UserFollowsManager
        Since:
        6.1.0
      • findByUserId

        public List<UserFollows> findByUserId​(String userId)
        Method that retrieves a list of "UserFollows" relationships given an user id
        Parameters:
        userId - id of the user whose "UserFollows" relationship should be found
        Returns:
        a list of "UserFollows" relationships from the given author id.
        Since:
        6.1.0
      • remove

        public void remove​(UserFollows userFollows)
        Method that deletes an UserFollows relationship
        Parameters:
        userFollows - The UserFollows relationship
        Since:
        6.1.0
      • findByFollowedUserAndSocialNetwork

        public UserFollows findByFollowedUserAndSocialNetwork​(String userId,
                                                              String followedUserId,
                                                              String serviceInstanceId,
                                                              String socialNetworkId)
                                                       throws NoResultException
        Method used to find out if the current user is following another user in a given social network.
        Parameters:
        userId - Identifier for the current user
        followedUserId - Identifier for the possible followed user
        socialNetworkId - Identifier for the social network
        Returns:
        the relationship
        Throws:
        NoResultException
        Since:
        6.1.0
      • getDetailedFollowList

        public List<UserFollowsDecorator> getDetailedFollowList​(String userId,
                                                                String socialNetworkId,
                                                                String serviceInstanceId,
                                                                String actionType)
        Method designed to retrieve a list of users who follows the current user, or the users followed by this same user in a given social network.
        Parameters:
        userId - Identifier for the current user
        socialNetworkId - Identifier for the social network
        actionType - The description of how the operation will proceed: users followed, or, users being followed.
        Returns:
        the detailed info about followers
        Since:
        6.1.0