From 35a733be7d78fdefdf1e136e66168d9e8704a3cb Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Wed, 3 Aug 2016 13:50:25 +0000 Subject: [PATCH] Added further support to show feeds related to user's statistics, such as: recent posts, recent likes/comments made, recent likes/comments got git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@130957 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/GCubeSocialNetworking.java | 1 + .../shared/ShowUserStatisticAction.java | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/main/java/org/gcube/portal/databook/shared/ShowUserStatisticAction.java diff --git a/src/main/java/org/gcube/portal/databook/client/GCubeSocialNetworking.java b/src/main/java/org/gcube/portal/databook/client/GCubeSocialNetworking.java index 725d3cd..565127d 100644 --- a/src/main/java/org/gcube/portal/databook/client/GCubeSocialNetworking.java +++ b/src/main/java/org/gcube/portal/databook/client/GCubeSocialNetworking.java @@ -9,6 +9,7 @@ public class GCubeSocialNetworking implements EntryPoint { public static final String USER_PROFILE_OID = "userIdentificationParameter"; public static final String HASHTAG_OID = "hashtagIdentificationParameter"; public static final String SEARCH_OID = "elasticSearchIdentificationParameter"; + public static final String SHOW_STATISTICS_ACTION_OID = "showUserStatisticsActionParameter"; // see ShowUserStatisticAction public static final String GROUP_MEMBERS_OID = "teamIdentificationParameter"; public void onModuleLoad() { } diff --git a/src/main/java/org/gcube/portal/databook/shared/ShowUserStatisticAction.java b/src/main/java/org/gcube/portal/databook/shared/ShowUserStatisticAction.java new file mode 100644 index 0000000..c90d951 --- /dev/null +++ b/src/main/java/org/gcube/portal/databook/shared/ShowUserStatisticAction.java @@ -0,0 +1,25 @@ +package org.gcube.portal.databook.shared; + +/** + * Enum class that specify the possible actions to take when the GCubeSocialNetworking.SHOW_STATISTICS_ACTION_OID parameter + * is found in the page url + * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) + */ +public enum ShowUserStatisticAction { + + POSTS_MADE_BY_USER("Recent Posts"), + LIKES_MADE_BY_USER("Recent Likes Made"), + COMMENTS_MADE_BY_USER("Recent Comments Made"), + LIKES_GOT_BY_USER("Recent Likes Got"), + COMMENTS_GOT_BY_USER("Recent Comments Got"); + + private final String actionHumanFriendly; + + private ShowUserStatisticAction(String s) { + actionHumanFriendly = s; + } + + public String getHumanFriendlyAction() { + return this.actionHumanFriendly; + } +}