public interface DatabookStore
| Modifier and Type | Method and Description |
|---|---|
boolean |
addComment(Comment comment)
add a comment to a feed
|
boolean |
approveFriendship(String from,
String to)
userid from approves a friendship to userid to
|
boolean |
checkUnreadMessagesNotifications(String userid) |
boolean |
checkUnreadNotifications(String userid) |
void |
closeConnection()
close the connection to the underlying database
|
boolean |
deleteComment(String commentid,
String feedid)
delete a comment
|
boolean |
deleteFeed(String feedid)
delete a Feed from the store
|
boolean |
deleteHashTags(String feedid,
String vreid,
List<String> hashtags) |
boolean |
denyFriendship(String from,
String to)
userid from denies a friendship to userid to
|
boolean |
editComment(Comment comment)
edit a comment
|
List<Comment> |
getAllCommentByFeed(String feedid) |
List<Feed> |
getAllFeedsByApp(String appid) |
List<Feed> |
getAllFeedsByUser(String userid) |
List<Feed> |
getAllFeedsByVRE(String vreid) |
List<String> |
getAllLikedFeedIdsByUser(String userid) |
List<Feed> |
getAllLikedFeedsByUser(String userid,
int limit) |
List<Like> |
getAllLikesByFeed(String feedid) |
List<Notification> |
getAllNotificationByUser(String userid,
int limit) |
List<Feed> |
getAllPortalPrivacyLevelFeeds()
return all the feeds whose Level is PORTAL
|
List<String> |
getFriends(String userid) |
List<Invite> |
getInvitedEmailsByVRE(String vreid,
InviteStatus... status)
Use to get the list of invites per VRE
|
List<String> |
getPendingFriendRequests(String userid) |
List<Notification> |
getRangeNotificationsByUser(String userid,
int from,
int quantity) |
List<Feed> |
getRecentFeedsByUser(String userid,
int quantity)
return the most recent feeds for this user up to quantity param
|
List<Feed> |
getRecentFeedsByVRE(String vreid,
int quantity)
return the most recent feeds for this vre up to quantity param
|
RangeFeeds |
getRecentFeedsByVREAndRange(String vreid,
int from,
int quantity)
return the most recent feeds 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
|
List<Notification> |
getUnreadNotificationMessagesByUser(String userid)
return the not yet read notification messages
|
List<Notification> |
getUnreadNotificationsByUser(String userid)
return the not yet read notifications (not including messages)
|
List<NotificationChannelType> |
getUserNotificationChannels(String userid,
NotificationType notificationType)
return the channels a user chose for being notified for a given notification type
|
Map<NotificationType,NotificationChannelType[]> |
getUserNotificationPreferences(String userid)
get the notification preferences map (enableor disable the channels to be used for notifying the user)
|
List<Feed> |
getVREFeedsByHashtag(String vreid,
String hashtag) |
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
|
String |
isExistingInvite(String vreid,
String email) |
boolean |
like(Like like)
add a like to a feed
|
Feed |
readFeed(String feedid)
read a feed from a given id
|
Invite |
readInvite(String inviteid)
read an invite from a given id
|
Notification |
readNotification(String notificationid)
read a notification from a given id
|
boolean |
requestFriendship(String from,
String to)
userid from requests a friendship to userid to
|
boolean |
saveAppFeed(Feed feed)
save a Feed instance in the store
|
boolean |
saveFeedToVRETimeline(String feedKey,
String vreid)
save a Feed in the VRES TimeLine in the store
|
boolean |
saveHashTags(String feedid,
String vreid,
List<String> hashtags) |
InviteOperationResult |
saveInvite(Invite invite)
Save the invite for a given email into a given vre
|
boolean |
saveNotification(Notification notification)
save a Notification instance in the store
|
boolean |
saveUserFeed(Feed feed)
save a Feed instance in the store
|
boolean |
setAllNotificationReadByUser(String userid)
This is a fast way to set all notification to read quickly
|
boolean |
setInviteStatus(String vreid,
String email,
InviteStatus status)
set the status of an invite, see
InviteStatus |
boolean |
setNotificationRead(String notificationidToSet)
set an existing Notification instance in the to read
|
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)
|
boolean |
unlike(String userid,
String likeid,
String feedid)
unlike a feed
|
boolean requestFriendship(String from, String to)
boolean approveFriendship(String from, String to)
boolean denyFriendship(String from, String to)
List<String> getFriends(String userid)
userid - the user id you want to know friendsList<String> getPendingFriendRequests(String userid)
userid - the user id you want to know the pending friend requestsboolean saveUserFeed(Feed feed)
boolean deleteFeed(String feedid) throws FeedIDNotFoundException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException
FeedIDNotFoundExceptionPrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionboolean saveFeedToVRETimeline(String feedKey, String vreid) throws FeedIDNotFoundException
feedKey - feedKeyvreid - vre identifierFeedIDNotFoundExceptionboolean saveAppFeed(Feed feed)
Feed readFeed(String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException
List<Feed> getAllFeedsByUser(String userid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException
userid - user identifier
return all the feeds belonging to the useridFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionList<Feed> getAllFeedsByApp(String appid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException
appid - application identifier
return all the feeds belonging to the appidFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionList<Feed> getAllPortalPrivacyLevelFeeds() throws FeedTypeNotFoundException, ColumnNameNotFoundException, PrivacyLevelTypeNotFoundException
List<Feed> getRecentFeedsByUser(String userid, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException
userid - user identifierquantity - the number of most recent feeds for this userFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionList<Feed> getAllFeedsByVRE(String vreid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException
vreid - vre identifier
return all the feeds belonging to the useridFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionList<Feed> getRecentFeedsByVRE(String vreid, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException
vreid - VRES identifierquantity - the number of most recent feeds for this vreFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionIllegalArgumentExceptionFeedIDNotFoundExceptionRangeFeeds getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException
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" paramFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionboolean saveNotification(Notification notification)
boolean setNotificationRead(String notificationidToSet) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException
NotificationIDNotFoundExceptionNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotification readNotification(String notificationid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException
{@link - ColumnNameNotFoundException}{@link - NotificationIDNotFoundException}{@link - NotificationTypeNotFoundException}NotificationIDNotFoundExceptionNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionList<Notification> getAllNotificationByUser(String userid, int limit) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException
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 everythingNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundExceptionList<Notification> getRangeNotificationsByUser(String userid, int from, int quantity) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException
userid - user identifierfrom - the range start has to be greater than 0quantity - the number of most recent notifications for this user starting from "from" paramNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundExceptionboolean setAllNotificationReadByUser(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException
userid - {@link - ColumnNameNotFoundException}{@link - NotificationIDNotFoundException}{@link - NotificationTypeNotFoundException}NotificationIDNotFoundExceptionNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionList<Notification> getUnreadNotificationsByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException
userid - user identifierNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundExceptionList<Notification> getUnreadNotificationMessagesByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException
userid - user identifierNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundExceptionboolean checkUnreadNotifications(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException
userid - user identifierColumnNameNotFoundExceptionNotificationTypeNotFoundExceptionNotificationIDNotFoundExceptionboolean checkUnreadMessagesNotifications(String userid) throws NotificationIDNotFoundException, NotificationTypeNotFoundException, ColumnNameNotFoundException
userid - user identifierColumnNameNotFoundExceptionNotificationTypeNotFoundException - self explainingNotificationChannelTypeNotFoundException - self explainingNotificationIDNotFoundExceptionList<NotificationChannelType> getUserNotificationChannels(String userid, NotificationType notificationType) throws NotificationChannelTypeNotFoundException, NotificationTypeNotFoundException
userid - user identifiernotificationType - the type of the notificationNotificationChannelTypeNotFoundExceptionNotificationTypeNotFoundExceptionboolean setUserNotificationPreferences(String userid, Map<NotificationType,NotificationChannelType[]> enabledChannels)
userid - user identifiernotificationType - the type of the notificationenabledChannels - a map of the channels to which reach the user per notification, empty array or null values to set the key notification type offMap<NotificationType,NotificationChannelType[]> getUserNotificationPreferences(String userid) throws NotificationTypeNotFoundException, NotificationChannelTypeNotFoundException
userid - user identifierNotificationTypeNotFoundException - self explainingNotificationChannelTypeNotFoundException - self explainingboolean addComment(Comment comment) throws FeedIDNotFoundException
comment - the Comment instance to addFeedIDNotFoundExceptionList<Comment> getAllCommentByFeed(String feedid)
feedid - feed identifier
return all the comments belonging to the feedidboolean editComment(Comment comment) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, CommentIDNotFoundException, FeedIDNotFoundException
commentid - the comment identifier to editPrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionCommentIDNotFoundExceptionFeedIDNotFoundExceptionboolean deleteComment(String commentid, String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, CommentIDNotFoundException, FeedIDNotFoundException
commentid - the comment identifier to deletePrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionCommentIDNotFoundExceptionFeedIDNotFoundExceptionboolean like(Like like) throws FeedIDNotFoundException
the - like instanceFeedIDNotFoundExceptionboolean unlike(String userid, String likeid, String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, LikeIDNotFoundException, FeedIDNotFoundException
userid - user identifierlikeid - the like identifier to deletefeedid - the feedid to which the comment is associatedPrivacyLevelTypeNotFoundExceptionFeedTypeNotFoundExceptionColumnNameNotFoundExceptionLikeIDNotFoundExceptionFeedIDNotFoundExceptionList<String> getAllLikedFeedIdsByUser(String userid)
userid - user identifier
return all the feedids a user has likedList<Feed> getAllLikedFeedsByUser(String userid, int limit) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException
userid - user identifierlimit - set 0 to get everything, an int to get the most recent -limit- liked feedsColumnNameNotFoundException - .FeedIDNotFoundException - .FeedTypeNotFoundException - .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException - .
return all the feeds a user has likedList<Like> getAllLikesByFeed(String feedid)
feedid - feed identifier
return all the likes belonging to the feedidboolean saveHashTags(String feedid, String vreid, List<String> hashtags) throws FeedIDNotFoundException
hashtags - the hashtag including the '#'feedid - the feedid to which the hashtag is associatedvreid - VRE identifierFeedIDNotFoundExceptionboolean deleteHashTags(String feedid, String vreid, List<String> hashtags) throws FeedIDNotFoundException
hashtags - the hashtag including the '#'feedid - the feedid to which the hashtag is associatedvreid - VRE identifierFeedIDNotFoundExceptionMap<String,Integer> getVREHashtagsWithOccurrence(String vreid)
vreid - vre identifier (scope)List<Feed> getVREFeedsByHashtag(String vreid, String hashtag) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException
vreid - VRE identifierhashtag - the hashtag to look for including the '#', it is case sensitiveColumnNameNotFoundException - .FeedIDNotFoundException - .FeedTypeNotFoundException - .PrivacyLevelTypeNotFoundExceptionFeedIDNotFoundException - .InviteOperationResult saveInvite(Invite invite) throws javax.mail.internet.AddressException
invite - the invite object instanc to saveInviteOperationResult SUCCESS, FAILED or ALREADY_INVITED (if an invite is sent to en existing email in the same environment more than once)javax.mail.internet.AddressExceptionString isExistingInvite(String vreid, String email)
vreid - the environment where you want to check the inviteemail - the email of the invite to check in the environmnetInvite readInvite(String inviteid) throws InviteIDNotFoundException, InviteStatusNotFoundException
boolean setInviteStatus(String vreid, String email, InviteStatus status) throws InviteIDNotFoundException, InviteStatusNotFoundException
InviteStatusList<Invite> getInvitedEmailsByVRE(String vreid, InviteStatus... status) throws InviteIDNotFoundException, InviteStatusNotFoundException
vreid - the vre idstatus - optional, if you want to restict on the status, e.g. all pending invitesInviteIDNotFoundExceptionInviteStatusNotFoundExceptionvoid closeConnection()
Copyright © 2015. All Rights Reserved.