Interface FollowManager
@Exported
public interface FollowManager
FollowManager manages all aspects related to follow, such as to follow or
unfollow certain object, to return all objects followed by a user, etc.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
doesFollowObject
(ActivityActor actor, ActivityObject followedObject) Whether the actor follow the specified objectvoid
followObject
(String serviceId, ActivityActor actor, ActivityObject followedObject) To set the actor to follow the specified objectvoid
followObject
(ActivityActor actor, ActivityObject followedObject) To set the actor to follow the specified objectgetFollowedObjects
(ActivityActor actor) Return all objects followed by the specified actorgetFollowedObjects
(ActivityActor actor, boolean objectSecured) Return all objects followed by the specified actorvoid
unfollowObject
(String serviceId, ActivityActor actor, ActivityObject followedObject) Unfollow the specified object for an actor.void
unfollowObject
(String serviceId, ActivityObject followedObject) Unfollow the specified object for actors.void
unfollowObject
(ActivityActor actor, List<ActivityObject> followedObjects, boolean isAsync) Unfollow the specified list of objects for actor.void
unfollowObject
(ActivityActor actor, ActivityObject followedObject) Unfollow the specified object for an actor.void
unfollowObject
(ActivityObject followedObject) Unfollow the specified object for actors.
-
Method Details
-
followObject
void followObject(String serviceId, ActivityActor actor, ActivityObject followedObject) throws ActivityException To set the actor to follow the specified object- Parameters:
serviceId
- , the service in which the follow happens.actor
- the actor who follow the specified objectfollowedObject
- the object to be followed- Throws:
ActivityException
-
followObject
To set the actor to follow the specified object- Parameters:
actor
- the actor who follow the specified objectfollowedObject
- the object to be followed- Throws:
ActivityException
-
unfollowObject
void unfollowObject(String serviceId, ActivityActor actor, ActivityObject followedObject) throws ActivityException Unfollow the specified object for an actor.- Parameters:
serviceId
- , the service in which the follow happens.actor
- the actor who unfollow the specified objectfollowedObject
- the object to be unfollowed- Throws:
ActivityException
-
unfollowObject
Unfollow the specified object for an actor.- Parameters:
actor
- the actor who unfollow the specified objectfollowedObject
- the object to be unfollowed- Throws:
ActivityException
-
unfollowObject
Unfollow the specified object for actors.- Parameters:
followedObject
- the object to be unfollowed- Throws:
ActivityException
-
unfollowObject
Unfollow the specified object for actors.- Parameters:
serviceId
- , the service in which the follow happens.followedObject
- the object to be unfollowed- Throws:
ActivityException
-
unfollowObject
void unfollowObject(ActivityActor actor, List<ActivityObject> followedObjects, boolean isAsync) throws ActivityException Unfollow the specified list of objects for actor.- Parameters:
actor
- the actor who unfollow the specified objectfollowedObjects
- the list of objects to be unfollowedisAsync
- submit as asyncronous process if set this value to true- Throws:
ActivityException
-
doesFollowObject
boolean doesFollowObject(ActivityActor actor, ActivityObject followedObject) throws ActivityException Whether the actor follow the specified object- Parameters:
actor
- the actor to be checked whether he follow the specified objectfollowedObject
- the object to be checked- Returns:
- whether the actor follow the specified object
- Throws:
ActivityException
-
getFollowedObjects
Return all objects followed by the specified actor- Parameters:
actor
- the actor whose followed object to be returned- Returns:
- all objects followed by the specified actor
- Throws:
ActivityException
-
getFollowedObjects
List<ActivityObject> getFollowedObjects(ActivityActor actor, boolean objectSecured) throws ActivityException Return all objects followed by the specified actor- Parameters:
actor
- the actor whose followed object to be returnedobjectSecured
- If the objectSecured is true, the implemenation of this method should filter those objects that the user has no permission to access.- Returns:
- all objects followed by the specified actor
- Throws:
ActivityException
-