Class Filters
- java.lang.Object
-
- org.gcube.portal.social.networking.ws.utils.Filters
-
public class Filters extends Object
Filters to apply to feeds/comments etc- Author:
- Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
-
-
Constructor Summary
Constructors Constructor Description Filters()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidfilterCommentsPerContext(List<org.gcube.portal.databook.shared.Comment> comments, String context)Filter comments per contextstatic voidfilterFeedsPerContext(List<org.gcube.portal.databook.shared.Feed> feeds, String context)Deprecated.static voidfilterFeedsPerContextById(List<String> feedsIds, String context)Given a list of not filtered feeds, the methods remove feeds unaccessible in this scope.static voidfilterPostsPerContext(List<org.gcube.portal.databook.shared.Post> posts, String context)Given a list of not filtered posts, the methods remove posts unaccessible in this scope.static <T> voidhideSensitiveInformation(List<T> toClear, String usernameCaller)Depending on the type of object provided (e.g.
-
-
-
Method Detail
-
filterFeedsPerContextById
public static void filterFeedsPerContextById(List<String> feedsIds, String context) throws Exception
Given a list of not filtered feeds, the methods remove feeds unaccessible in this scope. If the initial context is the root: all feeds are returned; If the initial context is a VO: feeds for vres within the vo are returned; If the initial context is a vre: feeds of the vre are returned;- Parameters:
feedsIds-context-- Throws:
Exception
-
filterFeedsPerContext
@Deprecated public static void filterFeedsPerContext(List<org.gcube.portal.databook.shared.Feed> feeds, String context) throws Exception
Deprecated.Given a list of not filtered feeds, the methods remove feeds unaccessible in this scope. If the initial context is the root: all feeds are returned; If the initial context is a VO: feeds for vres within the vo are returned; If the initial context is a vre: feeds of the vre are returned;- Parameters:
retrievedLikedFeeds-context-- Throws:
Exception
-
filterPostsPerContext
public static void filterPostsPerContext(List<org.gcube.portal.databook.shared.Post> posts, String context) throws Exception
Given a list of not filtered posts, the methods remove posts unaccessible in this scope. If the initial context is the root: all posts are returned; If the initial context is a VO: posts for vres within the vo are returned; If the initial context is a vre: posts of the vre are returned;- Parameters:
context-- Throws:
Exception
-
filterCommentsPerContext
public static void filterCommentsPerContext(List<org.gcube.portal.databook.shared.Comment> comments, String context) throws Exception
Filter comments per context- Parameters:
comments-context-- Throws:
Exception
-
-