Class DBCassandraAstyanaxImpl

java.lang.Object
org.gcube.portal.databook.server.DBCassandraAstyanaxImpl
All Implemented Interfaces:
DatabookStore

public final class DBCassandraAstyanaxImpl extends Object implements DatabookStore
Author:
Massimiliano Assante ISTI-CNR, Costantino Perciante ISTI-CNR This class is used for querying and adding data to Cassandra via Astyanax High Level API
  • Constructor Details

    • DBCassandraAstyanaxImpl

      protected DBCassandraAstyanaxImpl(boolean dropSchema)
      use this constructor carefully from test classes
      Parameters:
      dropSchema - set true if you want do drop the current and set up new one
    • DBCassandraAstyanaxImpl

      public DBCassandraAstyanaxImpl()
      public constructor, no dropping schema is allowed
    • DBCassandraAstyanaxImpl

      public DBCassandraAstyanaxImpl(String infrastructureName)
      public constructor, no dropping schema is allowed, infrastructureName is given.
  • Method Details

    • requestFriendship

      public boolean requestFriendship(String from, String to)
      userid from requests a friendship to userid to
      Specified by:
      requestFriendship in interface DatabookStore
      Returns:
      true if everything went fine
    • approveFriendship

      public boolean approveFriendship(String from, String to)
      userid from approves a friendship to userid to
      Specified by:
      approveFriendship in interface DatabookStore
      Returns:
      true if everything went fine
    • denyFriendship

      public boolean denyFriendship(String from, String to)
      userid from denies a friendship to userid to
      Specified by:
      denyFriendship in interface DatabookStore
      Returns:
      true if everything went fine
    • getFriends

      public List<String> getFriends(String userid)
      Specified by:
      getFriends in interface DatabookStore
      Parameters:
      userid - the user id you want to know friends
      Returns:
      a List of userid representing the friends for the given userid
    • getPendingFriendRequests

      public List<String> getPendingFriendRequests(String userid)
      Specified by:
      getPendingFriendRequests in interface DatabookStore
      Parameters:
      userid - the user id you want to know the pending friend requests
      Returns:
      a List of userid representing the friends for the given userid
    • saveUserFeed

      @Deprecated public boolean saveUserFeed(org.gcube.portal.databook.shared.Feed post)
      Deprecated.
      Specified by:
      saveUserFeed in interface DatabookStore
      Returns:
      true if everything went fine
    • saveUserPost

      public boolean saveUserPost(org.gcube.portal.databook.shared.Post post)
      save a Post instance in the store
      Specified by:
      saveUserPost in interface DatabookStore
      Returns:
      true if everything went fine
    • saveUserFeed

      @Deprecated public boolean saveUserFeed(org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Attachment> attachments)
      Deprecated.
      Save a Feed instance in the store having more than one attachment Use this if you need to attach more than one file to the post
      Specified by:
      saveUserFeed in interface DatabookStore
      attachments - a list of attachments starting from the second
      Returns:
      true if everything went fine
    • saveUserPost

      public boolean saveUserPost(org.gcube.portal.databook.shared.Post post, List<org.gcube.portal.databook.shared.Attachment> attachments)
      Save a Post instance in the store having more than one attachment Use this if you need to attach more than one file to the post
      Specified by:
      saveUserPost in interface DatabookStore
      attachments - a list of attachments starting from the second
      Returns:
      true if everything went fine
    • saveAppFeed

      @Deprecated public boolean saveAppFeed(org.gcube.portal.databook.shared.Feed post)
      Deprecated.
      Specified by:
      saveAppFeed in interface DatabookStore
      Returns:
      true if everything went fine
    • saveAppPost

      public boolean saveAppPost(org.gcube.portal.databook.shared.Post post)
      save a Post instance in the store
      Specified by:
      saveAppPost in interface DatabookStore
      Returns:
      true if everything went fine
    • saveAppFeed

      @Deprecated public boolean saveAppFeed(org.gcube.portal.databook.shared.Feed feed, List<org.gcube.portal.databook.shared.Attachment> attachments)
      Deprecated.
      Specified by:
      saveAppFeed in interface DatabookStore
      attachments - a list of attachments starting from the second
      Returns:
      true if everything went fine
    • saveAppPost

      public boolean saveAppPost(org.gcube.portal.databook.shared.Post post, List<org.gcube.portal.databook.shared.Attachment> attachments)
      Save a Post instance in the store Use this if your app needs to attach more than one file to the post
      Specified by:
      saveAppPost in interface DatabookStore
      attachments - a list of attachments starting from the second
      Returns:
      true if everything went fine
    • saveFeedToVRETimeline

      @Deprecated public boolean saveFeedToVRETimeline(String feedKey, String vreid) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Deprecated.
      Save a post in the VRES TimeLine in the store
      Specified by:
      saveFeedToVRETimeline in interface DatabookStore
      Parameters:
      feedKey - feedKey
      vreid - vre identifier
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • savePostToVRETimeline

      public boolean savePostToVRETimeline(String postKey, String vreid) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      save a post in the VRES TimeLine in the store
      Specified by:
      savePostToVRETimeline in interface DatabookStore
      Parameters:
      postKey - the post id
      vreid - vre identifier
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • readFeed

      @Deprecated public org.gcube.portal.databook.shared.Feed readFeed(String feedid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Deprecated.
      Specified by:
      readFeed in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • readPost

      public org.gcube.portal.databook.shared.Post readPost(String postid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      read a feed from a given id
      Specified by:
      readPost in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentFeedsByUserAndDate

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getRecentFeedsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException
      Deprecated.
      Specified by:
      getRecentFeedsByUserAndDate in interface DatabookStore
      Parameters:
      userid - user identifier
      timeInMillis - time in milliseconds from which you want to start retrieve the feeds
      Returns:
      the number of feeds in the range from: today to: timeInMillis
      Throws:
      IllegalArgumentException
    • getRecentPostsByUserAndDate

      public List<org.gcube.portal.databook.shared.Post> getRecentPostsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException
      Specified by:
      getRecentPostsByUserAndDate in interface DatabookStore
      Parameters:
      userid - user identifier
      timeInMillis - time in milliseconds from which you want to start retrieve the feeds
      Returns:
      the number of feeds in the range from: today to: timeInMillis
      Throws:
      IllegalArgumentException
    • deleteFeed

      @Deprecated public boolean deleteFeed(String feedId) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Deprecated.
      Delete a Feed from the store
      Specified by:
      deleteFeed in interface DatabookStore
      Returns:
      true if everything went fine
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • deletePost

      public boolean deletePost(String postid) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      delete a Feed from the store
      Specified by:
      deletePost in interface DatabookStore
      Returns:
      true if everything went fine
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • getAllFeedsByUser

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getAllFeedsByUser(String userid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Deprecated.
      Specified by:
      getAllFeedsByUser in interface DatabookStore
      Parameters:
      userid - user identifier return all the feeds belonging to the userid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllPostsByUser

      public List<org.gcube.portal.databook.shared.Post> getAllPostsByUser(String userid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllPostsByUser in interface DatabookStore
      Parameters:
      userid - user identifier return all the feeds belonging to the userid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllFeedsByApp

      public List<org.gcube.portal.databook.shared.Feed> getAllFeedsByApp(String appid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllFeedsByApp in interface DatabookStore
      Parameters:
      appid - application identifier return all the feeds belonging to the appid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllPostsByApp

      public List<org.gcube.portal.databook.shared.Post> getAllPostsByApp(String appid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllPostsByApp in interface DatabookStore
      Parameters:
      appid - application identifier return all the feeds belonging to the appid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentCommentedFeedsByUserAndDate

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getRecentCommentedFeedsByUserAndDate(String userid, long timeInMillis) throws Exception
      Deprecated.
      Specified by:
      getRecentCommentedFeedsByUserAndDate in interface DatabookStore
      Parameters:
      userid - the user identifier like andrea.rossi
      timeInMillis - the initial time in millis to be considered
      Returns:
      a list of feeds commented by userid starting from timeInMillis
      Throws:
      Exception
    • getRecentCommentedPostsByUserAndDate

      public List<org.gcube.portal.databook.shared.Post> getRecentCommentedPostsByUserAndDate(String userid, long timeInMillis) throws Exception
      Specified by:
      getRecentCommentedPostsByUserAndDate in interface DatabookStore
      Parameters:
      userid - the user identifier like andrea.rossi
      timeInMillis - the initial time in millis to be considered
      Returns:
      a list of feeds commented by userid starting from timeInMillis
      Throws:
      Exception
    • getAllPortalPrivacyLevelFeeds

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getAllPortalPrivacyLevelFeeds() throws org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      Deprecated.
      Specified by:
      getAllPortalPrivacyLevelFeeds in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
    • getAllPortalPrivacyLevelPosts

      public List<org.gcube.portal.databook.shared.Post> getAllPortalPrivacyLevelPosts() throws org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      Description copied from interface: DatabookStore
      return all the feeds whose Level is PORTAL
      Specified by:
      getAllPortalPrivacyLevelPosts in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
    • getRecentFeedsByUser

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getRecentFeedsByUser(String userid, int quantity) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Deprecated.
      return the most recent feeds for this user up to quantity param
      Specified by:
      getRecentFeedsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      quantity - the number of most recent feeds for this user
      Returns:
      a List of most recent feeds for this user
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentPostsByUser

      public List<org.gcube.portal.databook.shared.Post> getRecentPostsByUser(String userid, int quantity) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Description copied from interface: DatabookStore
      return the most recent feeds for this user up to quantity param
      Specified by:
      getRecentPostsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      quantity - the number of most recent feeds for this user
      Returns:
      a List of most recent feeds for this user
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllFeedsByVRE

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getAllFeedsByVRE(String vreid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Deprecated.
      Specified by:
      getAllFeedsByVRE in interface DatabookStore
      Parameters:
      vreid - vre identifier return all the feeds belonging to the userid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllPostsByVRE

      public List<org.gcube.portal.databook.shared.Post> getAllPostsByVRE(String vreid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllPostsByVRE in interface DatabookStore
      Parameters:
      vreid - vre identifier return all the feeds belonging to the userid
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentFeedsByVRE

      @Deprecated public List<org.gcube.portal.databook.shared.Feed> getRecentFeedsByVRE(String vreid, int quantity) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Deprecated.
      Specified by:
      getRecentFeedsByVRE in interface DatabookStore
      Parameters:
      vreid - VRES identifier
      quantity - the number of most recent feeds for this vre
      Returns:
      a List of most recent feeds for this vre
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentPostsByVRE

      public List<org.gcube.portal.databook.shared.Post> getRecentPostsByVRE(String vreid, int quantity) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Description copied from interface: DatabookStore
      return the most recent posts for this vre up to quantity param
      Specified by:
      getRecentPostsByVRE in interface DatabookStore
      Parameters:
      vreid - VRES identifier
      quantity - the number of most recent posts for this vre
      Returns:
      a List of most recent posts for this vre
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentFeedsByVREAndRange

      public org.gcube.portal.databook.shared.RangeFeeds getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws IllegalArgumentException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      return the most recent posts for this vre up to quantity param and the last index of the feeds in the timeline lastReturnedFeedTimelineIndex is usuful to know from where to start the range the second time you ask because there are deletions
      Specified by:
      getRecentFeedsByVREAndRange in interface DatabookStore
      Parameters:
      vreid - VRES identifier
      from - the range start (most recent feeds for this vre) has to be greater than 0
      quantity - the number of most recent feeds for this vre starting from "from" param
      Returns:
      a RangeFeeds containing of most recent feeds for this vre
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      IllegalArgumentException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getRecentPostsByVREAndRange

      public org.gcube.portal.databook.shared.RangePosts getRecentPostsByVREAndRange(String vreid, int from, int quantity) throws IllegalArgumentException, org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      return the most recent posts for this vre up to quantity param and the last index of the posts in the timeline lastReturnedPostTimelineIndex is useful to know from where to start the range the next time you ask, because there are deletions
      Specified by:
      getRecentPostsByVREAndRange in interface DatabookStore
      Parameters:
      vreid - VRES identifier
      from - the range start (most recent feeds for this vre) has to be greater than 0
      quantity - the number of most recent feeds for this vre starting from "from" param
      Returns:
      a RangePosts containing of most recent feeds for this vre
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      IllegalArgumentException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • saveNotification

      public boolean saveNotification(org.gcube.portal.databook.shared.Notification n)
      save a Notification instance in the store
      Specified by:
      saveNotification in interface DatabookStore
      Returns:
      true if everything went fine
    • readNotification

      public org.gcube.portal.databook.shared.Notification readNotification(String notificationid) throws org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException, org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      read a notification from a given id
      Specified by:
      readNotification in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException - if the notification ID is not found
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException - if the notification type is not found
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - if a column name is not found
    • setNotificationRead

      public boolean setNotificationRead(String notificationidToSet) throws org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException, org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      set an existing Notification instance in the to read
      Specified by:
      setNotificationRead in interface DatabookStore
      Returns:
      true if everything went fine
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • getAllNotificationByUser

      public List<org.gcube.portal.databook.shared.Notification> getAllNotificationByUser(String userid, int limit) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Specified by:
      getAllNotificationByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      limit - set 0 to get everything, an int to get the most recent -limit- notifications return all the notifications belonging to the userid up to limit, set 0 to get everything
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • getUnreadNotificationsByUser

      public List<org.gcube.portal.databook.shared.Notification> getUnreadNotificationsByUser(String userid) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
      return the not yet read notifications (not including messages)
      Specified by:
      getUnreadNotificationsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      Returns:
      a List of not yet read notifications for this user
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
    • getRangeNotificationsByUser

      public List<org.gcube.portal.databook.shared.Notification> getRangeNotificationsByUser(String userid, int from, int quantity) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
      Specified by:
      getRangeNotificationsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      from - the range start has to be greater than 0
      quantity - the number of most recent notifications for this user starting from "from" param
      Returns:
      all the notifications for the userid in the range requested
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
    • setAllNotificationReadByUser

      public boolean setAllNotificationReadByUser(String userid) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      This is a fast way to set all notification to read quickly
      Specified by:
      setAllNotificationReadByUser in interface DatabookStore
      Returns:
      true if everything went fine
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException - if the notification type is not found
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - if a column name is not found
    • checkUnreadNotifications

      public boolean checkUnreadNotifications(String userid) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Specified by:
      checkUnreadNotifications in interface DatabookStore
      Parameters:
      userid - user identifier
      Returns:
      true if there are unread notifications (not including messages), false if they are all read
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • checkUnreadMessagesNotifications

      public boolean checkUnreadMessagesNotifications(String userid) throws org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException, org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Specified by:
      checkUnreadMessagesNotifications in interface DatabookStore
      Parameters:
      userid - user identifier
      Returns:
      true if there are unread messages notifications (including messages), false if they are all read
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationIDNotFoundException
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException - self explaining
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
    • getUserNotificationChannels

      public List<org.gcube.portal.databook.shared.NotificationChannelType> getUserNotificationChannels(String userid, org.gcube.portal.databook.shared.NotificationType notificationType) throws org.gcube.portal.databook.shared.ex.NotificationChannelTypeNotFoundException, org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
      return the channels a user chose for being notified for a given notification type
      Specified by:
      getUserNotificationChannels in interface DatabookStore
      Parameters:
      userid - user identifier
      notificationType - the type of the notification
      Returns:
      a list of NotificationChannelType that represents the channels this user wants to be notified
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationChannelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException
    • setUserNotificationPreferences

      public boolean setUserNotificationPreferences(String userid, Map<org.gcube.portal.databook.shared.NotificationType,org.gcube.portal.databook.shared.NotificationChannelType[]> enabledChannels)
      set the notification preferences map (enable or disable the channels to be used for notifying the user)
      Specified by:
      setUserNotificationPreferences in interface DatabookStore
      Parameters:
      userid - user identifier
      enabledChannels - a map of the channels to which reach the user per notification, empty array or null values to set the key notification type off
      Returns:
      true if everything was fine
    • getUserNotificationPreferences

      public Map<org.gcube.portal.databook.shared.NotificationType,org.gcube.portal.databook.shared.NotificationChannelType[]> getUserNotificationPreferences(String userid) throws org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException, org.gcube.portal.databook.shared.ex.NotificationChannelTypeNotFoundException
      get the notification preferences map (enableor disable the channels to be used for notifying the user) by default Workspace and Calendar Notifications are set to Portal
      Specified by:
      getUserNotificationPreferences in interface DatabookStore
      Parameters:
      userid - user identifier
      Returns:
      the map
      Throws:
      org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException - self explaining
      org.gcube.portal.databook.shared.ex.NotificationChannelTypeNotFoundException - self explaining
    • addComment

      public boolean addComment(org.gcube.portal.databook.shared.Comment comment) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      add a comment to a feed
      Specified by:
      addComment in interface DatabookStore
      Parameters:
      comment - the Comment instance to add
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • readCommentById

      public org.gcube.portal.databook.shared.Comment readCommentById(String commentId) throws org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
      Specified by:
      readCommentById in interface DatabookStore
      Parameters:
      commentId - comment unique identifier
      Returns:
      the comment belonging to the commentId
      Throws:
      org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
    • getAllCommentByFeed

      @Deprecated public List<org.gcube.portal.databook.shared.Comment> getAllCommentByFeed(String feedid)
      Deprecated.
      Specified by:
      getAllCommentByFeed in interface DatabookStore
      Parameters:
      feedid - feed identifier return all the comments belonging to the feedid
    • getAllCommentByPost

      public List<org.gcube.portal.databook.shared.Comment> getAllCommentByPost(String postid)
      Specified by:
      getAllCommentByPost in interface DatabookStore
      Parameters:
      postid - the post identifier return all the comments belonging to the postid
    • getRecentCommentsByUserAndDate

      public List<org.gcube.portal.databook.shared.Comment> getRecentCommentsByUserAndDate(String userid, long timeInMillis) throws Exception
      Specified by:
      getRecentCommentsByUserAndDate in interface DatabookStore
      Parameters:
      userid - user identifier
      timeInMillis - time in milliseconds from which you want to start retrieve the feeds
      Returns:
      a list of comments (sorted starting from the most recent one) made by the user since timeInMillis up to now
      Throws:
      Exception
    • editComment

      public boolean editComment(org.gcube.portal.databook.shared.Comment comment2Edit) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.CommentIDNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      edit a comment
      Specified by:
      editComment in interface DatabookStore
      Parameters:
      comment2Edit - the comment to edit
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • deleteComment

      public boolean deleteComment(String commentid, String feedid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.CommentIDNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      deletes a comment
      Specified by:
      deleteComment in interface DatabookStore
      Parameters:
      commentid - the comment identifier to delete
      feedid - the feedid to which the comment is associated
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • like

      public boolean like(org.gcube.portal.databook.shared.Like like) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      add a like to a feed
      Specified by:
      like in interface DatabookStore
      Parameters:
      like - instance
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • unlike

      public boolean unlike(String userid, String likeid, String feedid) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.LikeIDNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      unlike a feed
      Specified by:
      unlike in interface DatabookStore
      Parameters:
      userid - user identifier
      likeid - the like identifier to delete
      feedid - the feedid to which the comment is associated
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      org.gcube.portal.databook.shared.ex.LikeIDNotFoundException
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • getAllLikedFeedIdsByUser

      @Deprecated public List<String> getAllLikedFeedIdsByUser(String userid)
      Deprecated.
      Specified by:
      getAllLikedFeedIdsByUser in interface DatabookStore
      Parameters:
      userid - user identifier return all the feedids a user has liked
    • getAllLikedPostIdsByUser

      public List<String> getAllLikedPostIdsByUser(String userid)
      Specified by:
      getAllLikedPostIdsByUser in interface DatabookStore
      Parameters:
      userid - user identifier return all the feedids a user has liked
    • getAllLikedFeedsByUser

      public List<org.gcube.portal.databook.shared.Feed> getAllLikedFeedsByUser(String userid, int limit) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllLikedFeedsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      limit - set 0 to get everything, an int to get the most recent -limit- liked feeds
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException - .
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - .
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException - .
    • getAllLikedPostsByUser

      public List<org.gcube.portal.databook.shared.Post> getAllLikedPostsByUser(String userid, int limit) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAllLikedPostsByUser in interface DatabookStore
      Parameters:
      userid - user identifier
      limit - set 0 to get everything, an int to get the most recent -limit- liked posts
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException - .
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - .
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException - .
    • getRecentLikedFeedsByUserAndDate

      public List<org.gcube.portal.databook.shared.Feed> getRecentLikedFeedsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException
      Specified by:
      getRecentLikedFeedsByUserAndDate in interface DatabookStore
      Parameters:
      userid - user identifier
      timeInMillis - time in milliseconds from which you want to start retrieve the feeds
      Returns:
      the likes made to feeds in the range from: today to: timeInMillis
      Throws:
      IllegalArgumentException
    • getRecentLikedPostsByUserAndDate

      public List<org.gcube.portal.databook.shared.Post> getRecentLikedPostsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException
      Specified by:
      getRecentLikedPostsByUserAndDate in interface DatabookStore
      Parameters:
      userid - user identifier
      timeInMillis - time in milliseconds from which you want to start retrieve the feeds
      Returns:
      the likes made to feeds in the range from: today to: timeInMillis
      Throws:
      IllegalArgumentException
    • getAllLikesByFeed

      @Deprecated public List<org.gcube.portal.databook.shared.Like> getAllLikesByFeed(String feedid)
      Deprecated.
      Specified by:
      getAllLikesByFeed in interface DatabookStore
      Parameters:
      feedid - postid identifier return all the likes belonging to the postid
    • getAllLikesByPost

      public List<org.gcube.portal.databook.shared.Like> getAllLikesByPost(String postid)
      Specified by:
      getAllLikesByPost in interface DatabookStore
      Parameters:
      postid - postid identifier return all the likes belonging to the postid
    • saveHashTags

      public boolean saveHashTags(String feedid, String vreid, List<String> hashtags) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      saveHashTags in interface DatabookStore
      Parameters:
      feedid - the postid to which the hashtag is associated
      vreid - VRE identifier
      hashtags - the hashtag including the '#'
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • deleteHashTags

      public boolean deleteHashTags(String feedid, String vreid, List<String> hashtags) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      deleteHashTags in interface DatabookStore
      Parameters:
      feedid - the postid to which the hashtag is associated
      vreid - VRE identifier
      hashtags - the hashtag including the '#'
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • saveHashTagsComment

      public boolean saveHashTagsComment(String commentId, String vreid, List<String> hashtags) throws org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
      Specified by:
      saveHashTagsComment in interface DatabookStore
      Parameters:
      commentId - the commentId to which the hashtag is associated
      vreid - VRE identifier
      hashtags - the hashtag including the '#'
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
    • deleteHashTagsComment

      public boolean deleteHashTagsComment(String commentId, String vreid, List<String> hashtags) throws org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
      Specified by:
      deleteHashTagsComment in interface DatabookStore
      Parameters:
      commentId - the commentId to which the hashtag is associated
      vreid - VRE identifier
      hashtags - the hashtag including the '#'
      Returns:
      true if success, false otherwise
      Throws:
      org.gcube.portal.databook.shared.ex.CommentIDNotFoundException
    • getVREHashtagsWithOccurrence

      public Map<String,Integer> getVREHashtagsWithOccurrence(String vreid)
      get a map of vre hashtags where the key is the hashtag and the value is the occurrence of the hashtag in the VRE
      Specified by:
      getVREHashtagsWithOccurrence in interface DatabookStore
      Parameters:
      vreid - vre identifier (scope)
      Returns:
      a HashMap>String, Integer< of vre Hashtags associated with their occurrence
    • getVREHashtagsWithOccurrenceFilteredByTime

      public Map<String,Integer> getVREHashtagsWithOccurrenceFilteredByTime(String vreid, long timestamp)
      get a map of vre hashtags where the key is the hashtag and the value is the occurrence of the hashtag in the VRE
      Specified by:
      getVREHashtagsWithOccurrenceFilteredByTime in interface DatabookStore
      Parameters:
      vreid - vre identifier (scope)
      timestamp - do not consider hashtags used before timestamp
      Returns:
      a HashMap>String, Integer< of vre Hashtags associated with their occurrence
    • getVREFeedsByHashtag

      public List<org.gcube.portal.databook.shared.Feed> getVREFeedsByHashtag(String vreid, String hashtag) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Specified by:
      getVREFeedsByHashtag in interface DatabookStore
      Parameters:
      vreid - VRE identifier
      hashtag - the hashtag to look for including the '#', it is case sensitive
      Returns:
      all the feeds having the hashtag passed as parameter
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException - .
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException - .
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - .
    • getVREPostsByHashtag

      public List<org.gcube.portal.databook.shared.Post> getVREPostsByHashtag(String vreid, String hashtag) throws org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException, org.gcube.portal.databook.shared.ex.FeedIDNotFoundException, org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException
      Specified by:
      getVREPostsByHashtag in interface DatabookStore
      Parameters:
      vreid - VRE identifier
      hashtag - the hashtag to look for including the '#', it is case sensitive
      Returns:
      all the feeds having the hashtag passed as parameter
      Throws:
      org.gcube.portal.databook.shared.ex.PrivacyLevelTypeNotFoundException
      org.gcube.portal.databook.shared.ex.FeedTypeNotFoundException - .
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException - .
      org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException - .
    • isExistingInvite

      public String isExistingInvite(String vreid, String email)
      Specified by:
      isExistingInvite in interface DatabookStore
      Parameters:
      vreid - the environment where you want to check the invite
      email - the email of the invite to check in the environmnet
      Returns:
      the InviteId if present, null otherwise
    • saveInvite

      public org.gcube.portal.databook.shared.InviteOperationResult saveInvite(org.gcube.portal.databook.shared.Invite invite) throws jakarta.mail.internet.AddressException
      Save the invite for a given email into a given vre
      Specified by:
      saveInvite in interface DatabookStore
      Parameters:
      invite - the invite object instanc to save
      Returns:
      InviteOperationResult SUCCESS, FAILED or ALREADY_INVITED (if an invite is sent to en existing email in the same environment more than once)
      Throws:
      jakarta.mail.internet.AddressException
    • readInvite

      public org.gcube.portal.databook.shared.Invite readInvite(String inviteid) throws org.gcube.portal.databook.shared.ex.InviteIDNotFoundException, org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
      read an invite from a given id
      Specified by:
      readInvite in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.InviteIDNotFoundException
      org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
    • setInviteStatus

      public boolean setInviteStatus(String vreid, String email, org.gcube.portal.databook.shared.InviteStatus status) throws org.gcube.portal.databook.shared.ex.InviteIDNotFoundException, org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
      set the status of an invite, see InviteStatus
      Specified by:
      setInviteStatus in interface DatabookStore
      Throws:
      org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
      org.gcube.portal.databook.shared.ex.InviteIDNotFoundException
    • getInvitedEmailsByVRE

      public List<org.gcube.portal.databook.shared.Invite> getInvitedEmailsByVRE(String vreid, org.gcube.portal.databook.shared.InviteStatus... status) throws org.gcube.portal.databook.shared.ex.InviteIDNotFoundException, org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
      Use to get the list of invites per VRE
      Specified by:
      getInvitedEmailsByVRE in interface DatabookStore
      Parameters:
      vreid - the vre id
      status - optional, if you want to restict on the status, e.g. all pending invites
      Returns:
      return the list of invites
      Throws:
      org.gcube.portal.databook.shared.ex.InviteIDNotFoundException
      org.gcube.portal.databook.shared.ex.InviteStatusNotFoundException
    • getAttachmentsByFeedId

      public List<org.gcube.portal.databook.shared.Attachment> getAttachmentsByFeedId(String feedId) throws org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
      Specified by:
      getAttachmentsByFeedId in interface DatabookStore
      Returns:
      the list of attachments of the feed feedId, starting from the second one (first attachment is included in Feed instance already)
      Throws:
      org.gcube.portal.databook.shared.ex.FeedIDNotFoundException
    • closeConnection

      public void closeConnection()
      close the connection to the underlying database
      Specified by:
      closeConnection in interface DatabookStore
    • getAllVREIds

      public List<String> getAllVREIds()
      Description copied from interface: DatabookStore
      Retrieve all the ids of the vre
      Specified by:
      getAllVREIds in interface DatabookStore
      Returns:
      the set of ids of the vre available or empty list in case of errors.