Class NewsServiceImpl

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, NewsService

    public class NewsServiceImpl
    extends com.google.gwt.user.server.rpc.RemoteServiceServlet
    implements NewsService
    The server side implementation of the RPC service.
    See Also:
    Serialized Form
    • Constructor Detail

      • NewsServiceImpl

        public NewsServiceImpl()
    • Method Detail

      • init

        public void init()
        Overrides:
        init in class javax.servlet.GenericServlet
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
      • getPostsByHashtag

        public ArrayList<org.gcube.portal.databook.shared.EnhancedFeed> getPostsByHashtag​(String hashtag)
        return the posts having the hashtag passed as param the user has access on
        Specified by:
        getPostsByHashtag in interface NewsService
        Parameters:
        hashtag - the hashtag to look for including '#'
      • getSinglePost

        public org.gcube.portal.databook.shared.EnhancedFeed getSinglePost​(String postKey)
        return only one post with all the comments
        Specified by:
        getSinglePost in interface NewsService
      • getMorePosts

        public MorePostsBean getMorePosts​(int start,
                                          int quantity)
        MorePostsBean contains the timeline index of the last returned valid post (because if you delete a feed is stays on in the timeline and is marked deleted) and contains the Feeds
        Specified by:
        getMorePosts in interface NewsService
        Parameters:
        strat - the range start (most recent posts for this vre) has to be greater than 0
        quantity - the number of most recent posts for this vre starting from "start" param
      • comment

        public OperationResult comment​(String feedid,
                                       String commentText,
                                       HashSet<MentionedDTO> mentionedItemsSet,
                                       String feedOwnerId,
                                       boolean isAppFeed)
        Specified by:
        comment in interface NewsService
        Parameters:
        feedid - the id of the commented post
        commentText - the comment text
        feedOwnerId - the username of the user who created the post that was commented
      • getPostsRelatedToUserStatistics

        public ArrayList<org.gcube.portal.databook.shared.EnhancedFeed> getPostsRelatedToUserStatistics​(org.gcube.portal.databook.shared.ShowUserStatisticAction action,
                                                                                                        int from,
                                                                                                        int quantity)
        Specified by:
        getPostsRelatedToUserStatistics in interface NewsService