Class ContentViewServiceImpl
- java.lang.Object
-
- in.cs699.tensors.delagram.content_view_service.service.ContentViewServiceImpl
-
- All Implemented Interfaces:
ContentViewService
@Service public class ContentViewServiceImpl extends Object implements ContentViewService
An implementation of the Business-logic.- Author:
- swaroop_nath
-
-
Constructor Summary
Constructors Constructor Description ContentViewServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Feed>
fetchRecentFeed(String currentUserID)
An implementation for the logic of fetching feed for a user.void
registerReport(Map<String,Object> payload)
An implementation that allows to register a report.void
updateMemoryWithComment(String memoryID, String currentUserID, String reactedUserID, String commentText)
An implementation of updating a memory with the newly added comment.void
updateMemoryWithReact(String memoryID, String currentUserID, String reactedUserID)
An implementation of updating a memory with the newly added star.
-
-
-
Method Detail
-
fetchRecentFeed
public List<Feed> fetchRecentFeed(String currentUserID) throws InternalServerException, FeedLoadFailedException
An implementation for the logic of fetching feed for a user.- Specified by:
fetchRecentFeed
in interfaceContentViewService
- Parameters:
currentUserID
- The id of the user currently logged in.- Returns:
- Returns the list of feed for the user.
- Throws:
InternalServerException
- Thrown incase there is some internal error.FeedLoadFailedException
- Thrown incase the feed for the user couldn't be loaded.
-
updateMemoryWithReact
public void updateMemoryWithReact(String memoryID, String currentUserID, String reactedUserID) throws InternalServerException
An implementation of updating a memory with the newly added star.- Specified by:
updateMemoryWithReact
in interfaceContentViewService
- Parameters:
memoryID
- The id of the memory on which the star/comment has been made.currentUserID
- The id of the user making the reaction.reactedUserID
- The id of the user on whose memory reaction has been made.- Throws:
InternalServerException
- Thrown incase that there is some internal error.
-
updateMemoryWithComment
public void updateMemoryWithComment(String memoryID, String currentUserID, String reactedUserID, String commentText) throws InternalServerException
An implementation of updating a memory with the newly added comment.- Specified by:
updateMemoryWithComment
in interfaceContentViewService
- Parameters:
memoryID
- The id of the memory on which the star/comment has been made.currentUserID
- The id of the user making the reaction.reactedUserID
- The id of the user on whose memory reaction has been made.commentText
- The comment that has been made.- Throws:
InternalServerException
- Thrown incase that there is some internal error.
-
registerReport
public void registerReport(Map<String,Object> payload)
An implementation that allows to register a report.- Specified by:
registerReport
in interfaceContentViewService
- Parameters:
payload
- The request body, passed in directly from the controller.
-
-