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 |
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<String> |
getPendingFriendRequests(String userid) |
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
|
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)
|
boolean |
like(Like like)
add a like to a feed
|
Feed |
readFeed(String feedid)
read a feed 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 |
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 |
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 (enableor disable the channels to be used for notifying the user)
|
boolean |
unlike(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 PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException
vreid - VRES identifierquantity - the number of most recent feeds for this vreFeedTypeNotFoundExceptionPrivacyLevelTypeNotFoundExceptionColumnNameNotFoundExceptionFeedIDNotFoundExceptionboolean 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 everythingNotificationTypeNotFoundExceptionColumnNameNotFoundExceptionNotificationIDNotFoundExceptionboolean 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 likeid, String feedid) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, LikeIDNotFoundException, FeedIDNotFoundException
likeid - the like identifier to deletefeedid - the feedid to shich 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 feedidvoid closeConnection()
Copyright © 2014. All Rights Reserved.