2013-04-04 15:41:17 +02:00
|
|
|
package org.gcube.portlets.user.newsfeed.client;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2015-07-15 18:47:28 +02:00
|
|
|
import java.util.HashSet;
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2024-01-25 18:34:17 +01:00
|
|
|
import org.gcube.social_networking.socialnetworking.model.shared.Comment;
|
|
|
|
import org.gcube.social_networking.socialnetworking.model.shared.EnhancedPost;
|
|
|
|
import org.gcube.social_networking.socialnetworking.model.shared.Like;
|
|
|
|
import org.gcube.social_networking.socialnetworking.model.shared.ShowUserStatisticAction;
|
2018-03-18 17:59:46 +01:00
|
|
|
import org.gcube.portlets.user.newsfeed.shared.MentionedDTO;
|
2018-06-25 17:53:00 +02:00
|
|
|
import org.gcube.portlets.user.newsfeed.shared.MorePostsBean;
|
2015-05-18 16:30:22 +02:00
|
|
|
import org.gcube.portlets.user.newsfeed.shared.OperationResult;
|
2013-04-04 17:29:51 +02:00
|
|
|
import org.gcube.portlets.user.newsfeed.shared.UserSettings;
|
2014-10-08 23:15:42 +02:00
|
|
|
import org.gcube.portlets.widgets.pickitem.shared.ItemBean;
|
2013-04-04 15:41:17 +02:00
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The async counterpart of <code>NewsService</code>.
|
|
|
|
*/
|
|
|
|
public interface NewsServiceAsync {
|
|
|
|
|
2013-04-19 14:24:54 +02:00
|
|
|
void getAllUpdateUserFeeds(int feedsNoPerCategory,
|
2024-01-25 18:34:17 +01:00
|
|
|
AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getOnlyConnectionsUserPosts(
|
2024-01-25 18:34:17 +01:00
|
|
|
AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void like(String postid, String postText, String postOwnerId,
|
2013-04-04 15:41:17 +02:00
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getAllLikesByPost(String postid,
|
2013-04-04 15:41:17 +02:00
|
|
|
AsyncCallback<ArrayList<Like>> callback);
|
|
|
|
|
2024-01-25 18:34:17 +01:00
|
|
|
void getOnlyMyUserPosts(AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2013-04-04 17:29:51 +02:00
|
|
|
void getUserSettings(AsyncCallback<UserSettings> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2018-03-18 17:59:46 +01:00
|
|
|
void comment(String feedid, String text, HashSet<MentionedDTO> mentionedUsers,
|
2014-04-10 17:45:50 +02:00
|
|
|
String feedOwnerId, boolean isAppFeed,
|
2015-05-18 16:30:22 +02:00
|
|
|
AsyncCallback<OperationResult> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getAllCommentsByPost(String postid,
|
2013-04-04 15:41:17 +02:00
|
|
|
AsyncCallback<ArrayList<Comment>> callback);
|
|
|
|
|
|
|
|
void deleteComment(String commentid, String feedid,
|
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void deletePost(String feedid, AsyncCallback<Boolean> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2019-07-17 12:41:02 +02:00
|
|
|
void editComment(String text, Comment toEdit, HashSet<MentionedDTO> mentionedUsers, AsyncCallback<OperationResult> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
2024-01-25 18:34:17 +01:00
|
|
|
void getOnlyLikedPosts(AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2013-04-19 14:24:54 +02:00
|
|
|
|
2024-01-25 18:34:17 +01:00
|
|
|
void getSinglePost(String postKey, AsyncCallback<EnhancedPost> callback);
|
2014-03-11 19:29:39 +01:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getMorePosts(int from, int quantity,
|
|
|
|
AsyncCallback<MorePostsBean> callback);
|
2014-04-08 23:40:13 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void unlike(String postid, String postText, String postOwnerId,
|
2014-04-08 23:40:13 +02:00
|
|
|
AsyncCallback<Boolean> callback);
|
2014-04-09 18:45:21 +02:00
|
|
|
|
2016-11-10 18:55:12 +01:00
|
|
|
void getOrganizationUsers(AsyncCallback<ArrayList<ItemBean>> callback);
|
2014-10-07 16:41:08 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getPostsByHashtag(String hashtag,
|
2024-01-25 18:34:17 +01:00
|
|
|
AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2016-02-12 18:35:11 +01:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getPostsByQuery(String query, int from, int quantity,
|
2024-01-25 18:34:17 +01:00
|
|
|
AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2016-08-03 16:29:59 +02:00
|
|
|
|
2018-06-25 17:53:00 +02:00
|
|
|
void getPostsRelatedToUserStatistics(ShowUserStatisticAction action, int from, int quantity,
|
2024-01-25 18:34:17 +01:00
|
|
|
AsyncCallback<ArrayList<EnhancedPost>> callback);
|
2013-04-04 15:41:17 +02:00
|
|
|
|
|
|
|
}
|