Package org.gcube.portal.databook.server
Interface DatabookStore
- All Known Implementing Classes:
DBCassandraAstyanaxImpl
public interface DatabookStore
- Author:
- Massimiliano Assante ISTI-CNR, Costantino Perciante ISTI-CNR
DatabookStoreis the high level interface for querying and adding data to DatabookStore
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddComment(Comment comment) add a comment to a feedbooleanapproveFriendship(String from, String to) userid from approves a friendship to userid tobooleanbooleancheckUnreadNotifications(String userid) voidclose the connection to the underlying databasebooleandeleteComment(String commentid, String feedid) deletes a commentbooleandeleteFeed(String feedid) Deprecated.use saveUserPostbooleandeleteHashTags(String postid, String vreid, List<String> hashtags) booleandeleteHashTagsComment(String commentId, String vreid, List<String> hashtags) booleandeletePost(String postid) delete a Feed from the storebooleandenyFriendship(String from, String to) userid from denies a friendship to userid tobooleaneditComment(Comment comment) edit a commentgetAllCommentByFeed(String feedid) Deprecated.use getAllCommentByPostgetAllCommentByPost(String postid) getAllFeedsByApp(String appid) Deprecated.use getAllPostsByApp insteadgetAllFeedsByUser(String userid) Deprecated.use getAllPostsByUser insteadgetAllFeedsByVRE(String vreid) Deprecated.use getAllPostsByVREgetAllLikedFeedIdsByUser(String userid) Deprecated.use getAllLikedPostIdsByUsergetAllLikedFeedsByUser(String userid, int limit) Deprecated.use getAllLikedPostsByUsergetAllLikedPostIdsByUser(String userid) getAllLikedPostsByUser(String userid, int limit) getAllLikesByFeed(String postid) Deprecated.use getAllLikesByPostgetAllLikesByPost(String postid) getAllNotificationByUser(String userid, int limit) Deprecated.use getAllPortalPrivacyLevelPosts instead return all the feeds whose Level is PORTALreturn all the feeds whose Level is PORTALgetAllPostsByApp(String appid) getAllPostsByUser(String userid) getAllPostsByVRE(String vreid) Retrieve all the ids of the vregetAttachmentsByFeedId(String feedId) getFriends(String userid) getInvitedEmailsByVRE(String vreid, InviteStatus... status) Use to get the list of invites per VREgetPendingFriendRequests(String userid) getRangeNotificationsByUser(String userid, int from, int quantity) getRecentCommentedFeedsByUserAndDate(String userid, long timeInMillis) Deprecated.use getRecentCommentedPostsByUserAndDate insteadgetRecentCommentedPostsByUserAndDate(String userid, long timeInMillis) getRecentCommentsByUserAndDate(String userid, long timeInMillis) getRecentFeedsByUser(String userid, int quantity) Deprecated.getRecentFeedsByUserAndDate(String userid, long timeInMillis) Deprecated.use getRecentPostsByUserAndDategetRecentFeedsByVRE(String vreid, int quantity) Deprecated.use getRecentPostsByVRE return the most recent feeds for this vre up to quantity paramgetRecentFeedsByVREAndRange(String vreid, int from, int quantity) Deprecated.use getRecentPostsByVREAndRangegetRecentLikedFeedsByUserAndDate(String userid, long timeInMillis) Deprecated.use getRecentLikedPostsByUserAndDategetRecentLikedPostsByUserAndDate(String userid, long timeInMillis) getRecentPostsByUser(String userid, int quantity) return the most recent feeds for this user up to quantity paramgetRecentPostsByUserAndDate(String userid, long timeInMillis) getRecentPostsByVRE(String vreid, int quantity) return the most recent posts for this vre up to quantity paramgetRecentPostsByVREAndRange(String vreid, int from, int quantity) 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 deletionsgetUnreadNotificationsByUser(String userid) return the not yet read notifications (not including messages)getUserNotificationChannels(String userid, NotificationType notificationType) return the channels a user chose for being notified for a given notification typegetUserNotificationPreferences(String userid) get the notification preferences map (enableor disable the channels to be used for notifying the user)getVREFeedsByHashtag(String vreid, String hashtag) Deprecated.use getVREPostsByHashtagget a map of vre hashtags where the key is the hashtag and the value is the occurrence of the hashtag in the VREgetVREHashtagsWithOccurrenceFilteredByTime(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 VREgetVREPostsByHashtag(String vreid, String hashtag) isExistingInvite(String vreid, String email) booleanadd a like to a feedreadCommentById(String commentId) Deprecated.use readPost read a feed from a given idreadInvite(String inviteid) read an invite from a given idreadNotification(String notificationid) read a notification from a given idread a feed from a given idbooleanrequestFriendship(String from, String to) userid from requests a friendship to userid tobooleansaveAppFeed(Feed feed) Deprecated.use saveAppPost save a Post instance in the storebooleansaveAppFeed(Feed feed, List<Attachment> attachments) Deprecated.use saveAppPost Save a Post instance in the store Use this if your app needs to attach more than one file to the postbooleansaveAppPost(Post feed) save a Post instance in the storebooleansaveAppPost(Post feed, List<Attachment> attachments) Save a Post instance in the store Use this if your app needs to attach more than one file to the postbooleansaveAttachmentEntry(String feedId, Attachment toSave) save an attachmentbooleansaveFeedToVRETimeline(String feedKey, String vreid) Deprecated.use savePostToVRETimelinebooleansaveHashTags(String postid, String vreid, List<String> hashtags) booleansaveHashTagsComment(String commentId, String vreid, List<String> hashtags) saveInvite(Invite invite) Save the invite for a given email into a given vrebooleansaveNotification(Notification notification) save a Notification instance in the storebooleansavePostToVRETimeline(String postKey, String vreid) save a post in the VRES TimeLine in the storebooleansaveUserFeed(Feed feed) Deprecated.use saveUserPost save a Feed instance in the storebooleansaveUserFeed(Feed feed, List<Attachment> attachments) Deprecated.use saveUserPostbooleansaveUserPost(Post feed) save a Post instance in the storebooleansaveUserPost(Post post, List<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 postbooleansetAllNotificationReadByUser(String userid) This is a fast way to set all notification to read quicklybooleansetInviteStatus(String vreid, String email, InviteStatus status) set the status of an invite, seeInviteStatusbooleansetNotificationRead(String notificationidToSet) set an existing Notification instance in the to readbooleansetUserNotificationPreferences(String userid, Map<NotificationType, NotificationChannelType[]> enabledChannels) set the notification preferences map (enable or disable the channels to be used for notifying the user)booleanunlike a feed
-
Method Details
-
requestFriendship
userid from requests a friendship to userid to- Returns:
- true if everything went fine
-
approveFriendship
userid from approves a friendship to userid to- Returns:
- true if everything went fine
-
denyFriendship
userid from denies a friendship to userid to- Returns:
- true if everything went fine
-
getFriends
- Parameters:
userid- the user id you want to know friends- Returns:
- a List of userid representing the friends for the given userid
-
getPendingFriendRequests
- 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
-
deleteFeed
boolean deleteFeed(String feedid) throws FeedIDNotFoundException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException Deprecated.use saveUserPostDelete a Feed from the store- Returns:
- true if everything went fine
- Throws:
FeedIDNotFoundExceptionPrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundException
-
deletePost
boolean deletePost(String postid) throws FeedIDNotFoundException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException delete a Feed from the store- Returns:
- true if everything went fine
- Throws:
FeedIDNotFoundExceptionPrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundException
-
saveFeedToVRETimeline
Deprecated.use savePostToVRETimelineSave a post in the VRES TimeLine in the store- Parameters:
feedKey- feedKeyvreid- vre identifier- Throws:
FeedIDNotFoundException
-
savePostToVRETimeline
save a post in the VRES TimeLine in the store- Parameters:
postKey- the post idvreid- vre identifier- Throws:
FeedIDNotFoundException
-
readFeed
Feed readFeed(String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException Deprecated.use readPost read a feed from a given id -
readPost
Post readPost(String postid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException read a feed from a given id -
getAllFeedsByUser
List<Feed> getAllFeedsByUser(String userid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException Deprecated.use getAllPostsByUser instead- Parameters:
userid- user identifier return all the feeds belonging to the userid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getAllPostsByUser
List<Post> getAllPostsByUser(String userid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException - Parameters:
userid- user identifier return all the feeds belonging to the userid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getAllFeedsByApp
List<Feed> getAllFeedsByApp(String appid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException Deprecated.use getAllPostsByApp instead- Parameters:
appid- application identifier return all the feeds belonging to the appid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getAllPostsByApp
List<Post> getAllPostsByApp(String appid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException - Parameters:
appid- application identifier return all the feeds belonging to the appid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getRecentCommentedFeedsByUserAndDate
Deprecated.use getRecentCommentedPostsByUserAndDate instead- Parameters:
userid- the user identifier like andrea.rossitimeInMillis- the initial time in millis to be considered- Returns:
- a list of feeds commented by userid starting from timeInMillis
- Throws:
Exception
-
getRecentCommentedPostsByUserAndDate
- Parameters:
userid- the user identifier like andrea.rossitimeInMillis- the initial time in millis to be considered- Returns:
- a list of feeds commented by userid starting from timeInMillis
- Throws:
Exception
-
getAllPortalPrivacyLevelFeeds
List<Feed> getAllPortalPrivacyLevelFeeds() throws FeedTypeNotFoundException, ColumnNameNotFoundException, PrivacyLevelTypeNotFoundExceptionDeprecated.use getAllPortalPrivacyLevelPosts instead return all the feeds whose Level is PORTAL -
getAllPortalPrivacyLevelPosts
List<Post> getAllPortalPrivacyLevelPosts() throws FeedTypeNotFoundException, ColumnNameNotFoundException, PrivacyLevelTypeNotFoundExceptionreturn all the feeds whose Level is PORTAL -
getRecentFeedsByUser
List<Feed> getRecentFeedsByUser(String userid, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException Deprecated.return the most recent feeds for this user up to quantity param- Parameters:
userid- user identifierquantity- the number of most recent feeds for this user- Returns:
- a
Listof most recent feeds for this user - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getRecentPostsByUser
List<Post> getRecentPostsByUser(String userid, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException return the most recent feeds for this user up to quantity param- Parameters:
userid- user identifierquantity- the number of most recent feeds for this user- Returns:
- a
Listof most recent feeds for this user - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getAllFeedsByVRE
List<Feed> getAllFeedsByVRE(String vreid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException Deprecated.use getAllPostsByVRE- Parameters:
vreid- vre identifier return all the feeds belonging to the userid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getAllPostsByVRE
List<Post> getAllPostsByVRE(String vreid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException - Parameters:
vreid- vre identifier return all the feeds belonging to the userid- Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getRecentFeedsByVRE
List<Feed> getRecentFeedsByVRE(String vreid, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException Deprecated.use getRecentPostsByVRE return the most recent feeds for this vre up to quantity param- Parameters:
vreid- VRES identifierquantity- the number of most recent feeds for this vre- Returns:
- a
Listof most recent feeds for this vre - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionIllegalArgumentExceptionFeedIDNotFoundException
-
getRecentPostsByVRE
List<Post> getRecentPostsByVRE(String vreid, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException return the most recent posts for this vre up to quantity param- Parameters:
vreid- VRES identifierquantity- the number of most recent posts for this vre- Returns:
- a
Listof most recent posts for this vre - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionIllegalArgumentExceptionFeedIDNotFoundException
-
getRecentFeedsByVREAndRange
RangeFeeds getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException Deprecated.use getRecentPostsByVREAndRangereturn 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- Parameters:
vreid- VRES identifierfrom- the range start (most recent feeds for this vre) has to be greater than 0quantity- the number of most recent feeds for this vre starting from "from" param- Returns:
- a
RangeFeedscontaining of most recent feeds for this vre - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getRecentPostsByVREAndRange
RangePosts getRecentPostsByVREAndRange(String vreid, int from, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, 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- Parameters:
vreid- VRES identifierfrom- the range start (most recent feeds for this vre) has to be greater than 0quantity- the number of most recent feeds for this vre starting from "from" param- Returns:
- a
RangePostscontaining of most recent feeds for this vre - Throws:
FeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundException
-
getRecentFeedsByUserAndDate
List<Feed> getRecentFeedsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException Deprecated.use getRecentPostsByUserAndDate- Parameters:
userid- user identifiertimeInMillis- 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
List<Post> getRecentPostsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException - Parameters:
userid- user identifiertimeInMillis- 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
-
setNotificationRead
boolean setNotificationRead(String notificationidToSet) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException set an existing Notification instance in the to read- Returns:
- true if everything went fine
- Throws:
NotificationIDNotFoundExceptionNotificationTypeNotFoundExceptionColumnNameNotFoundException
-
readNotification
Notification readNotification(String notificationid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException read a notification from a given id -
getAllNotificationByUser
List<Notification> getAllNotificationByUser(String userid, int limit) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException - Parameters:
userid- user identifierlimit- 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:
NotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundException
-
getRangeNotificationsByUser
List<Notification> getRangeNotificationsByUser(String userid, int from, int quantity) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException - Parameters:
userid- user identifierfrom- the range start has to be greater than 0quantity- 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:
NotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundException
-
setAllNotificationReadByUser
boolean setAllNotificationReadByUser(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException This is a fast way to set all notification to read quickly- Parameters:
userid-- Returns:
- true if everything went fine
- Throws:
ColumnNameNotFoundExceptionNotificationIDNotFoundExceptionNotificationTypeNotFoundException
-
getUnreadNotificationsByUser
List<Notification> getUnreadNotificationsByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException return the not yet read notifications (not including messages)- Parameters:
userid- user identifier- Returns:
- a
Listof not yet read notifications for this user - Throws:
NotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundException
-
checkUnreadNotifications
boolean checkUnreadNotifications(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException - Parameters:
userid- user identifier- Returns:
- true if there are unread notifications (not including messages), false if they are all read
- Throws:
ColumnNameNotFoundExceptionNotificationTypeNotFoundExceptionNotificationIDNotFoundException
-
checkUnreadMessagesNotifications
boolean checkUnreadMessagesNotifications(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException - Parameters:
userid- user identifier- Returns:
- true if there are unread messages notifications (including messages), false if they are all read
- Throws:
ColumnNameNotFoundExceptionNotificationTypeNotFoundException- self explainingNotificationIDNotFoundException
-
setUserNotificationPreferences
boolean setUserNotificationPreferences(String userid, Map<NotificationType, NotificationChannelType[]> enabledChannels) set the notification preferences map (enable or disable the channels to be used for notifying the user)- Parameters:
userid- user identifierenabledChannels- 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
Map<NotificationType,NotificationChannelType[]> getUserNotificationPreferences(String userid) throws NotificationTypeNotFoundException, NotificationChannelTypeNotFoundException get the notification preferences map (enableor disable the channels to be used for notifying the user)- Parameters:
userid- user identifier- Returns:
- the map
- Throws:
NotificationTypeNotFoundException- self explainingNotificationChannelTypeNotFoundException- self explaining
-
readCommentById
- Parameters:
commentId- comment unique identifier- Returns:
- the comment belonging to the commentId
- Throws:
CommentIDNotFoundException
-
getAllCommentByFeed
Deprecated.use getAllCommentByPost- Parameters:
feedid- feed identifier return all the comments belonging to the feedid
-
getAllCommentByPost
- Parameters:
postid- the post identifier return all the comments belonging to the postid
-
getRecentCommentsByUserAndDate
- Parameters:
userid- user identifiertimeInMillis- 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
-
deleteComment
boolean deleteComment(String commentid, String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, CommentIDNotFoundException, FeedIDNotFoundException deletes a comment- Parameters:
commentid- the comment identifier to deletefeedid- the feedid to which the comment is associated- Returns:
- true if success, false otherwise
- Throws:
PrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionCommentIDNotFoundExceptionFeedIDNotFoundException
-
unlike
boolean unlike(String userid, String likeid, String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, LikeIDNotFoundException, FeedIDNotFoundException unlike a feed- Parameters:
userid- user identifierlikeid- the like identifier to deletefeedid- the feedid to which the comment is associated- Returns:
- true if success, false otherwise
- Throws:
PrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionLikeIDNotFoundExceptionFeedIDNotFoundException
-
getAllLikedFeedIdsByUser
Deprecated.use getAllLikedPostIdsByUser- Parameters:
userid- user identifier return all the feedids a user has liked
-
getAllLikedPostIdsByUser
- Parameters:
userid- user identifier return all the feedids a user has liked
-
getAllLikedFeedsByUser
List<Feed> getAllLikedFeedsByUser(String userid, int limit) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException Deprecated.use getAllLikedPostsByUser- Parameters:
userid- user identifierlimit- set 0 to get everything, an int to get the most recent -limit- liked feeds- Throws:
ColumnNameNotFoundException- .FeedIDNotFoundException- .FeedTypeNotFoundException- .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException- . return all the feeds a user has liked
-
getAllLikedPostsByUser
List<Post> getAllLikedPostsByUser(String userid, int limit) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException - Parameters:
userid- user identifierlimit- set 0 to get everything, an int to get the most recent -limit- liked posts- Throws:
ColumnNameNotFoundException- .FeedIDNotFoundException- .FeedTypeNotFoundException- .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException- . return all the feeds a user has liked
-
getRecentLikedFeedsByUserAndDate
List<Feed> getRecentLikedFeedsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException Deprecated.use getRecentLikedPostsByUserAndDate- Parameters:
userid- user identifiertimeInMillis- 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
List<Post> getRecentLikedPostsByUserAndDate(String userid, long timeInMillis) throws IllegalArgumentException - Parameters:
userid- user identifiertimeInMillis- 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.use getAllLikesByPost- Parameters:
postid- postid identifier return all the likes belonging to the postid
-
getAllLikesByPost
- Parameters:
postid- postid identifier return all the likes belonging to the postid
-
saveHashTags
boolean saveHashTags(String postid, String vreid, List<String> hashtags) throws FeedIDNotFoundException - Parameters:
hashtags- the hashtag including the '#'postid- the postid to which the hashtag is associatedvreid- VRE identifier- Returns:
- true if success, false otherwise
- Throws:
FeedIDNotFoundException
-
saveHashTagsComment
boolean saveHashTagsComment(String commentId, String vreid, List<String> hashtags) throws CommentIDNotFoundException - Parameters:
hashtags- the hashtag including the '#'commentId- the commentId to which the hashtag is associatedvreid- VRE identifier- Returns:
- true if success, false otherwise
- Throws:
CommentIDNotFoundException
-
deleteHashTags
boolean deleteHashTags(String postid, String vreid, List<String> hashtags) throws FeedIDNotFoundException - Parameters:
hashtags- the hashtag including the '#'postid- the postid to which the hashtag is associatedvreid- VRE identifier- Returns:
- true if success, false otherwise
- Throws:
FeedIDNotFoundException
-
deleteHashTagsComment
boolean deleteHashTagsComment(String commentId, String vreid, List<String> hashtags) throws CommentIDNotFoundException - Parameters:
hashtags- the hashtag including the '#'commentId- the commentId to which the hashtag is associatedvreid- VRE identifier- Returns:
- true if success, false otherwise
- Throws:
CommentIDNotFoundException
-
getVREHashtagsWithOccurrence
get a map of vre hashtags where the key is the hashtag and the value is the occurrence of the hashtag in the VRE- Parameters:
vreid- vre identifier (scope)- Returns:
- a HashMap<String, Integer> of vre Hashtags associated with their occurrence
-
getVREHashtagsWithOccurrenceFilteredByTime
get a map of vre hashtags where the key is the hashtag and the value is the occurrence of the hashtag in the VRE- 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
List<Feed> getVREFeedsByHashtag(String vreid, String hashtag) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException Deprecated.use getVREPostsByHashtag- Parameters:
vreid- VRE identifierhashtag- the hashtag to look for including the '#', it is case sensitive- Returns:
- all the feeds having the hashtag passed as parameter
- Throws:
ColumnNameNotFoundException- .FeedIDNotFoundException- .FeedTypeNotFoundException- .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException- .
-
getVREPostsByHashtag
List<Post> getVREPostsByHashtag(String vreid, String hashtag) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException - Parameters:
vreid- VRE identifierhashtag- the hashtag to look for including the '#', it is case sensitive- Returns:
- all the feeds having the hashtag passed as parameter
- Throws:
ColumnNameNotFoundException- .FeedIDNotFoundException- .FeedTypeNotFoundException- .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException- .
-
isExistingInvite
- Parameters:
vreid- the environment where you want to check the inviteemail- the email of the invite to check in the environmnet- Returns:
- the InviteId if present, null otherwise
-
readInvite
read an invite from a given id -
getAttachmentsByFeedId
- Parameters:
feedId-- Returns:
- the list of attachments of the feed feedId, starting from the second one (first attachment is included in Feed instance already)
- Throws:
FeedIDNotFoundException
-
getAllVREIds
Retrieve all the ids of the vre- Returns:
- the set of ids of the vre available or empty list in case of errors.
-
closeConnection
void closeConnection()close the connection to the underlying database
-