@Transactional(propagation=REQUIRED)
public interface FollowManagement
| Modifier and Type | Method and Description |
|---|---|
void |
followBlog(Long blogId)
Adds the specified blog/topic to the followed items of the current user.
|
void |
followDiscussion(Long discussionId)
Adds the discussion with the specified ID to the followed items of the current user.
|
void |
followDiscussionByNoteId(Long noteId)
Adds the discussion of the specified note to the followed items of the current user.
|
boolean |
followsBlog(Long blogId)
Returns whether the current user follows the blog.
|
boolean |
followsDiscussion(Long discussionId)
Returns true if the current user follows the discussion, otherwise false.
|
boolean |
followsTag(Long id)
Returns true if the current user follows the tag, otherwise false.
|
boolean |
followsUser(Long userId)
Returns whether the current user follows the user.
|
void |
followTag(Long tagId)
Adds the specified tag to the followed items of the current user.
|
void |
followUser(Long userId)
Adds the specified user to the followed items of the current user.
|
void |
tagRemoved(Long removedTagId,
Long newTagId,
List<Long> followers)
Method to be called after a tag has been removed or merged with another tag.
|
void |
unfollowBlog(Long blogId)
Removes the specified blog/topic from the followed items of the current user.
|
void |
unfollowDiscussion(Long discussionId)
Removes the discussion with the specified ID from the followed items of the current user.
|
void |
unfollowDiscussionByNoteId(Long noteId)
Removes the discussion of the specified note from the followed items of the current user.
|
void |
unfollowTag(Long tagId)
Removes the specified tag from the followed items of the current user.
|
void |
unfollowUser(Long userId)
Removes the specified user from the followed items of the current user.
|
void followBlog(Long blogId) throws NotFoundException, BlogAccessException
blogId - the ID of the topic to followNotFoundException - in case the topic does not existBlogAccessException - in case the current user has no read access to the topicvoid followDiscussion(Long discussionId) throws BlogAccessException, NotFoundException
discussionId - the ID of the discussion to followNotFoundException - in case the discussion does not existBlogAccessException - in case the current user has no read access to the topic of the discussion or the
discussionvoid followDiscussionByNoteId(Long noteId) throws NotFoundException, BlogAccessException
noteId - the ID of the note whose discussion should be followedNotFoundException - in case the discussion does not existBlogAccessException - in case the current user has no read access to the topic of the discussion or the
discussion@Transactional(readOnly=true) boolean followsBlog(Long blogId)
blogId - the ID of the blog@Transactional(readOnly=true) boolean followsDiscussion(Long discussionId)
discussionId - the ID of the discussion@Transactional(readOnly=true) boolean followsTag(Long id)
id - The ID of the tag.@Transactional(readOnly=true) boolean followsUser(Long userId)
userId - the ID of the uservoid followTag(Long tagId) throws NotFoundException
tagId - the ID of the tag to followNotFoundException - in case the tag does not existvoid followUser(Long userId) throws NotFoundException
userId - ID of the user to followNotFoundException - in case the user does not existvoid tagRemoved(Long removedTagId, Long newTagId, List<Long> followers) throws AuthorizationException, TagNotFoundException
removedTagId - the ID of the removed tagnewTagId - the ID of the tag the old tag was merged into, can be nullfollowers - the IDs of the users that followed the old tagAuthorizationException - in case the calling user is not the internal system userTagNotFoundException - in case newTagId is not null but there is no tag for that IDvoid unfollowBlog(Long blogId)
blogId - the ID of the topic to unfollowvoid unfollowDiscussion(Long discussionId)
discussionId - the ID of the discussion to unfollowvoid unfollowDiscussionByNoteId(Long noteId)
noteId - the ID of the note whose discussion should be unfollowedvoid unfollowTag(Long tagId)
tagId - the ID of the tag to unfollowvoid unfollowUser(Long userId)
userId - ID of the user to followCopyright © 2019 Communote team. All rights reserved.