NewsServiceImpl (gCube News Feed Portlet 1.6.2-SNAPSHOT API)
Date: 2014-04-01

org.gcube.portlets.user.newsfeed.server

## Class NewsServiceImpl

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
      - - com.google.gwt.user.server.rpc.RemoteServiceServlet
        - - org.gcube.portlets.user.newsfeed.server.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

- - ### Field Summary

    - ### Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

      `perThreadRequest, perThreadResponse`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NewsServiceImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.gcube.portal.databook.shared.Comment` | `comment(String feedid, String commentText, String feedOwnerId, boolean isAppFeed)`
    `boolean` | `deleteComment(String commentid, String feedid)`
    `boolean` | `deleteFeed(String feedid)`
    `void` | `destroy()`
    `org.gcube.portal.databook.shared.Comment` | `editComment(org.gcube.portal.databook.shared.Comment toEdit)`
    `ArrayList<org.gcube.portal.databook.shared.Comment>` | `getAllCommentsByFeed(String feedid)`
    `ArrayList<org.gcube.portal.databook.shared.Like>` | `getAllLikesByFeed(String feedid)`
    `ArrayList<EnhancedFeed>` | `getAllUpdateUserFeeds(int feedsNoPerCategory)`
    `String` | `getDevelopmentUser()`
    `MoreFeedsBean` | `getMoreFeeds(int start, int quantity)` MoreFeedsBean contains the timeline index of the last returned valid feed (because if you delete a feed is stays on in the timeline and is marked deleted) and contains the Feeds
    `ArrayList<EnhancedFeed>` | `getOnlyConnectionsUserFeeds()` return only the user connection feeds
    `ArrayList<EnhancedFeed>` | `getOnlyLikedFeeds()`
    `ArrayList<EnhancedFeed>` | `getOnlyMyUserFeeds()`
    `EnhancedFeed` | `getSingleFeed(String feedKey)` return only one feed with all the comments
    `UserSettings` | `getUserSettings()` this is the first method called by the web app
    `void` | `init()`
    `boolean` | `like(String feedid, String feedText, String feedOwnerId)`
    `String` | `transformUrls(String textToCheck)` utilty method that convert a URL in a text into a clickable link into the browser

    - ### Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet

      `checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse`

    - ### Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

      `doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent`

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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`

    - #### getDevelopmentUser

          public String getDevelopmentUser()

    - #### getUserSettings

          public UserSettings getUserSettings()

      this is the first method called by the web app
      Specified by:
        `getUserSettings` in interface `NewsService`

    - #### getAllUpdateUserFeeds

          public ArrayList<EnhancedFeed> getAllUpdateUserFeeds(int feedsNoPerCategory)

      Specified by:
        `getAllUpdateUserFeeds` in interface `NewsService`

    - #### getOnlyConnectionsUserFeeds

          public ArrayList<EnhancedFeed> getOnlyConnectionsUserFeeds()

      return only the user connection feeds
      Specified by:
        `getOnlyConnectionsUserFeeds` in interface `NewsService`

    - #### getSingleFeed

          public EnhancedFeed getSingleFeed(String feedKey)

      return only one feed with all the comments
      Specified by:
        `getSingleFeed` in interface `NewsService`

    - #### getMoreFeeds

          public MoreFeedsBean getMoreFeeds(int start,
                                   int quantity)

      MoreFeedsBean contains the timeline index of the last returned valid feed (because if you delete a feed is stays on in the timeline and is marked deleted) and contains the Feeds
      Specified by:
        `getMoreFeeds` in interface `NewsService`
      Parameters:
        `strat` - the range start (most recent feeds for this vre) has to be greater than 0
        `quantity` - the number of most recent feeds for this vre starting from "start" param

    - #### getOnlyMyUserFeeds

          public ArrayList<EnhancedFeed> getOnlyMyUserFeeds()

      Specified by:
        `getOnlyMyUserFeeds` in interface `NewsService`

    - #### getOnlyLikedFeeds

          public ArrayList<EnhancedFeed> getOnlyLikedFeeds()

      Specified by:
        `getOnlyLikedFeeds` in interface `NewsService`

    - #### like

          public boolean like(String feedid,
                     String feedText,
                     String feedOwnerId)

      Specified by:
        `like` in interface `NewsService`

    - #### comment

          public org.gcube.portal.databook.shared.Comment comment(String feedid,
                                                         String commentText,
                                                         String feedOwnerId,
                                                         boolean isAppFeed)

      Specified by:
        `comment` in interface `NewsService`
      Parameters:
        `feedid` - the id of the commented feed
        `commentText` - the comment text
        `feedOwnerId` - the username of the user who created the post that was commented

    - #### editComment

          public org.gcube.portal.databook.shared.Comment editComment(org.gcube.portal.databook.shared.Comment toEdit)

      Specified by:
        `editComment` in interface `NewsService`

    - #### getAllLikesByFeed

          public ArrayList<org.gcube.portal.databook.shared.Like> getAllLikesByFeed(String feedid)

      Specified by:
        `getAllLikesByFeed` in interface `NewsService`

    - #### getAllCommentsByFeed

          public ArrayList<org.gcube.portal.databook.shared.Comment> getAllCommentsByFeed(String feedid)

      Specified by:
        `getAllCommentsByFeed` in interface `NewsService`

    - #### deleteComment

          public boolean deleteComment(String commentid,
                              String feedid)

      Specified by:
        `deleteComment` in interface `NewsService`

    - #### deleteFeed

          public boolean deleteFeed(String feedid)

      Specified by:
        `deleteFeed` in interface `NewsService`

    - #### transformUrls

          public String transformUrls(String textToCheck)

      utilty method that convert a URL in a text into a clickable link into the browser
      Parameters:
        `text` -
      Returns:
        the text with the clickable url in it

Copyright © 2014. All Rights Reserved.