Interface SubscriptionService
- All Superinterfaces:
ActivateableBean
- All Known Implementing Classes:
SubscriptionServiceImpl
Subscription Service.
- Since:
- 4.0
- Author:
- Florian Mueller
-
Method Summary
Modifier and TypeMethodDescriptionvoidFollows a user.booleanReturns if the user follows to the given other user.getFollowers(String userId, org.alfresco.query.PagingRequest pagingRequest) Returns a list of users that follow the given user.intgetFollowersCount(String userId) Returns how many users follow the given user.getFollowing(String userId, org.alfresco.query.PagingRequest pagingRequest) Returns a list of users that the given user follows.intgetFollowingCount(String userId) Returns how many users the given user follows.intgetSubscriptionCount(String userId, SubscriptionItemTypeEnum type) Returns how many nodes the given user has subscribed to.getSubscriptions(String userId, SubscriptionItemTypeEnum type, org.alfresco.query.PagingRequest pagingRequest) Returns the nodes a user has subscribed to.booleanhasSubscribed(String userId, NodeRef node) Returns if the user has subscribed to the given node.booleanisActive()Returns if subscription are enabled for this system.booleanisSubscriptionListPrivate(String userId) Returns if the subscription list of the given user is set to private.voidsetSubscriptionListPrivate(String userId, boolean isPrivate) Sets or unsets the subscription list of the given user to private.voidSubscribes to a node.voidUnfollows a user.voidunsubscribe(String userId, NodeRef node) Unsubscribes from a node.
-
Method Details
-
getSubscriptions
@NotAuditable PagingSubscriptionResults getSubscriptions(String userId, SubscriptionItemTypeEnum type, org.alfresco.query.PagingRequest pagingRequest) Returns the nodes a user has subscribed to.- Parameters:
userId- the id of the usertype- the type of the nodespagingRequest- paging details- Throws:
PrivateSubscriptionListException- if the subscription list is private and the calling user is not allowed to see it
-
getSubscriptionCount
Returns how many nodes the given user has subscribed to.- Parameters:
userId- the id of the usertype- the type of the nodes
-
subscribe
Subscribes to a node.- Parameters:
userId- id of the usernode- the node
-
unsubscribe
Unsubscribes from a node.- Parameters:
userId- id of the usernode- the node
-
hasSubscribed
Returns if the user has subscribed to the given node.- Parameters:
userId- id of the usernode- the node
-
getFollowing
@NotAuditable PagingFollowingResults getFollowing(String userId, org.alfresco.query.PagingRequest pagingRequest) Returns a list of users that the given user follows.- Parameters:
userId- id of the userpagingRequest- paging details- Throws:
PrivateSubscriptionListException- if the subscription list is private and the calling user is not allowed to see it
-
getFollowers
@NotAuditable PagingFollowingResults getFollowers(String userId, org.alfresco.query.PagingRequest pagingRequest) Returns a list of users that follow the given user.- Parameters:
userId- id of the userpagingRequest- paging details
-
getFollowingCount
Returns how many users the given user follows.- Parameters:
userId- the id of the user
-
getFollowersCount
Returns how many users follow the given user.- Parameters:
userId- the id of the user
-
follow
Follows a user.- Parameters:
userId- the id of the useruserToFollow- the id of the user to follow
-
unfollow
@Auditable(parameters={"userId","userToUnfollow"}) void unfollow(String userId, String userToUnfollow) Unfollows a user.- Parameters:
userId- the id of the useruserToUnfollow- the id of the user to unfollow
-
follows
Returns if the user follows to the given other user.- Parameters:
userId- id of the useruserToFollow- the id of the other user
-
setSubscriptionListPrivate
@Auditable(parameters={"userId","isPrivate"}) void setSubscriptionListPrivate(String userId, boolean isPrivate) Sets or unsets the subscription list of the given user to private.- Parameters:
userId- the id of the userisPrivate-true- set list private,false- set list public
-
isSubscriptionListPrivate
Returns if the subscription list of the given user is set to private.- Parameters:
userId- the id of the user
-
isActive
Returns if subscription are enabled for this system.- Specified by:
isActivein interfaceActivateableBean- Returns:
trueif this bean is active
-