Class 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 Detail

      • Filters

        public Filters()
    • 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
      • hideSensitiveInformation

        public static <T> void hideSensitiveInformation​(List<T> toClear,
                                                        String usernameCaller)
        Depending on the type of object provided (e.g. Feed, Comment etc), some information are removed
        Parameters:
        comments -
        Throws:
        Exception