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
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
perThreadRequest, perThreadResponse |
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 |
NewsServiceImpl
public NewsServiceImpl()
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 feedcommentText
- the comment textfeedOwnerId
- 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.