Class UserFollowsManager
- java.lang.Object
-
- lumis.service.socialnetworkservices.microblog.core.manager.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 Summary
Fields Modifier and Type Field Description static String
ACTION_TYPE_WHO_FOLLOWS_ME
Param that defines a "Who Follows me" actionstatic String
ACTION_TYPE_WHO_I_FOLLOW
Param that defines a "Who I Follow" action
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserFollows
findByFollowedUserAndSocialNetwork(String userId, String followedUserId, String serviceInstanceId, String socialNetworkId)
Method used to find out if the current user is following another user in a given social network.List<UserFollows>
findByUserId(String userId)
Method that retrieves a list of "UserFollows" relationships given an user idList<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.static UserFollowsManager
getInstance()
Singleton method that retrieves a instance of this class.void
remove(UserFollows userFollows)
Method that deletes an UserFollows relationship
-
-
-
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 userfollowedUserId
- Identifier for the possible followed usersocialNetworkId
- 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 usersocialNetworkId
- Identifier for the social networkactionType
- The description of how the operation will proceed: users followed, or, users being followed.- Returns:
- the detailed info about followers
- Since:
- 6.1.0
-
-