org.gcube.portlets.user.newsfeed.server
Class NewsServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by 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
NewsServiceImpl()
           
 
Method Summary
 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)
           
 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

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

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 © 2013. All Rights Reserved.