org.sakaiproject.profile2.dao
Interface ProfileDao

All Known Implementing Classes:
ProfileDaoImpl

public interface ProfileDao

Internal DAO Interface for Profile2.

Author:
Steve Swinsburg (steve.swinsburg@gmail.com)

Field Summary
static String CONFIRMED
           
static String FRIEND_UUID
           
static String ID
           
static String MESSAGE_ID
           
static String OLDEST_STATUS_DATE
           
static String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST
           
static String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST_AND_BUSINESS_BIO
           
static String QUERY_FIND_SAKAI_PERSONS_BY_NAME_OR_EMAIL
           
static String QUERY_GET_ALL_SAKAI_PERSON_IDS
           
static String QUERY_GET_ALL_SAKAI_PERSON_IDS_COUNT
           
static String QUERY_GET_ALL_UNREAD_MESSAGES_COUNT
           
static String QUERY_GET_COMPANY_PROFILE
           
static String QUERY_GET_COMPANY_PROFILES
           
static String QUERY_GET_CONFIRMED_FRIEND_USERIDS_FOR_USER
           
static String QUERY_GET_CURRENT_PROFILE_IMAGE_RECORD
           
static String QUERY_GET_EXTERNAL_IMAGE_RECORD
           
static String QUERY_GET_EXTERNAL_INTEGRATION_INFO
           
static String QUERY_GET_FRIEND_RECORD
           
static String QUERY_GET_FRIEND_REQUEST
           
static String QUERY_GET_FRIEND_REQUESTS_FOR_USER
           
static String QUERY_GET_GALLERY_IMAGE_RECORDS
           
static String QUERY_GET_GALLERY_IMAGE_RECORDS_COUNT
           
static String QUERY_GET_GALLERY_RECORD
           
static String QUERY_GET_KUDOS_RECORD
           
static String QUERY_GET_LATEST_MESSAGE_IN_THREAD
           
static String QUERY_GET_MESSAGE
           
static String QUERY_GET_MESSAGE_PARTICIPANT_FOR_MESSAGE_AND_UUID
           
static String QUERY_GET_MESSAGE_THREAD
           
static String QUERY_GET_MESSAGE_THREADS
           
static String QUERY_GET_MESSAGE_THREADS_COUNT
           
static String QUERY_GET_MESSAGES_IN_THREAD
           
static String QUERY_GET_MESSAGES_IN_THREAD_COUNT
           
static String QUERY_GET_OFFICIAL_IMAGE_RECORD
           
static String QUERY_GET_PREFERENCES_RECORD
           
static String QUERY_GET_PRIVACY_RECORD
           
static String QUERY_GET_SAKAI_PERSON
           
static String QUERY_GET_SENT_MESSAGES_COUNT
           
static String QUERY_GET_SOCIAL_NETWORKING_INFO
           
static String QUERY_GET_STATUS_UPDATES_COUNT
           
static String QUERY_GET_THREAD_PARTICIPANTS
           
static String QUERY_GET_THREADS_WITH_UNREAD_MESSAGES_COUNT
           
static String QUERY_GET_USER_STATUS
           
static String QUERY_GET_WALL_ITEMS
           
static String QUERY_OTHER_PROFILE_IMAGE_RECORDS
           
static String SEARCH
           
static String THREAD
           
static String USER_UUID
           
static String UUID
           
 
Method Summary
 boolean addNewCommentToWallItem(WallItemComment wallItemComment)
          Adds a new wall item comment.
 boolean addNewCompanyProfile(CompanyProfile companyProfile)
          Save a new CompanyProfile record
 boolean addNewConnection(ProfileFriend profileFriend)
          Save a new connection record
 boolean addNewGalleryImage(GalleryImage galleryImage)
          Add a new GalleryImage record
 ProfilePreferences addNewPreferencesRecord(ProfilePreferences prefs)
          Persist a new ProfilePreferences record and return it.
 ProfilePrivacy addNewPrivacyRecord(ProfilePrivacy privacy)
          Add a new ProfilePrivacy record
 boolean addNewProfileImage(ProfileImageUploaded profileImage)
          Add a new profile image record to the database.
 boolean addNewWallItemForUser(String userUuid, WallItem item)
          Adds a wall item for the specified user.
 boolean clearUserStatus(ProfileStatus profileStatus)
          Remove the ProfileStatus record for a user
 List<String> findSakaiPersonsByInterest(String search, boolean includeBusinessBio)
          Get a list of all userIds that match the search criteria in the interest fields.
 List<String> findSakaiPersonsByNameOrEmail(String search)
          Get a list of all userIds that match the search criteria in name or email
 List<String> getAllSakaiPersonIds()
          Get a list of uuids for all users that have a SakaiPerson record
 int getAllSakaiPersonIdsCount()
          Get a total count of all users with SakaiPerson records
 int getAllUnreadMessagesCount(String userId)
          Get a count of all unread messages for a user
 CompanyProfile getCompanyProfile(String userId, long companyProfileId)
          Get the CompanyProfile record for a user and company ID
 List<CompanyProfile> getCompanyProfiles(String userId)
          Get all CompanyProfile records for a user
 List<String> getConfirmedConnectionUserIdsForUser(String userId)
          Get a list of confirmed connections for a given user.
 ProfileFriend getConnectionRecord(String userId, String friendId)
          Get a connection record for a user/friend pair
 ProfileImageUploaded getCurrentProfileImageRecord(String userId)
          Get the current ProfileImage record from the database.
 List<ProfileImageUploaded> getCurrentProfileImageRecords(String userId)
          Get the current ProfileImage records from the database.
 ProfileImageExternal getExternalImageRecordForUser(String userId)
          Get a ProfileImageExternal record for a user
 ExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
          Get the ExternalIntegrationInfo record for a user
 GalleryImage getGalleryImageRecord(String userId, long imageId)
          Get the GalleryImage record for a user and image ID
 List<GalleryImage> getGalleryImages(String userId)
          Get all GalleryImage records for a user
 int getGalleryImagesCount(String userUuid)
          Get a count of all gallery images that a user has
 ProfileKudos getKudos(String userUuid)
          Get the kudos record for a user
 Message getLatestMessageInThread(String threadId)
          Get the latest Message in a MessageThread
 Message getMessage(String id)
          Get a Message record
 MessageParticipant getMessageParticipant(String messageId, String userUuid)
          Get a MessageParticipant record for the given message and user id
 List<Message> getMessagesInThread(String threadId)
          Get a list of all Messages in a given thread
 int getMessagesInThreadCount(String threadId)
          Get a count of all Messages in a given thread
 MessageThread getMessageThread(String threadId)
          Get a MessageThread record
 List<MessageThread> getMessageThreads(String userId)
          Get a list of MessageThreads for a user
 int getMessageThreadsCount(String userId)
          Get a count of all message threads for a user
 ProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
          Get the ProfileImageOfficial record from the database for the given user
 List<ProfileImageUploaded> getOtherProfileImageRecords(String userId)
          Get old ProfileImage records from the database.
 ProfileFriend getPendingConnection(String userId, String friendId)
          Get a connection record that is pending
 ProfilePreferences getPreferencesRecordForUser(String userId)
          Get a ProfilePreferences record for the user
 ProfilePrivacy getPrivacyRecord(String userId)
          Get the ProfilePrivacy record for the user
 List<String> getRequestedConnectionUserIdsForUser(String userId)
          Get a list of unconfirmed Friend requests for a given user.
 int getSentMessagesCount(String userId)
          Get a count of all sent messages for a user
 SocialNetworkingInfo getSocialNetworkingInfo(String userId)
          Get a SocialNetworkingInfo record for a user
 int getStatusUpdatesCount(String userUuid)
          Get a count of all status updates for a user
 List<String> getThreadParticipants(String threadId)
          Get a list of uuids of all perticipants in a thread
 int getThreadsWithUnreadMessagesCount(String userId)
          Get a count of all threads with unread messages for a user
 List<UserProfile> getUserProfiles(int start, int count)
          Get a list of UserProfiles withing the given pageing parameters
 ProfileStatus getUserStatus(String userId, Date oldestStatusDate)
          Get a ProfileStatus record for a user, but only if the date of the record is within the given time
 List<WallItem> getWallItemsForUser(String userUuid)
          Retrieves all wall items for the specified user.
 boolean removeCompanyProfile(CompanyProfile companyProfile)
          Remove a CompanyProfile record
 boolean removeConnection(ProfileFriend profileFriend)
          Remove a connection record
 boolean removeGalleryImage(GalleryImage galleryImage)
          Remove a GalleryImage record
 boolean removeWallItemFromWall(WallItem item)
          Removes a wall item.
 boolean saveExternalImage(ProfileImageExternal externalImage)
          Save a ProfileImageExternal record
 void saveNewMessage(Message message)
          Save a Message record
 void saveNewMessageParticipant(MessageParticipant participant)
          Save a MessageParticipant record
 void saveNewMessageParticipants(List<MessageParticipant> participants)
          Save a list of MessageParticipants
 void saveNewThread(MessageThread thread)
          Save a MessageThread record
 boolean saveOfficialImageUrl(ProfileImageOfficial officialImage)
          Save the ProfileImageOfficial record the database
 boolean savePreferencesRecord(ProfilePreferences prefs)
          Save a ProfilePreferences record
 boolean saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
          Save a SocialNetworkingInfo record
 boolean setUserStatus(ProfileStatus profileStatus)
          Set the status for a user
 boolean toggleMessageRead(MessageParticipant participant, boolean status)
          Toggle a Message as being read by the given participant
 boolean updateCompanyProfile(CompanyProfile companyProfile)
          Update a CompanyProfile record
 boolean updateConnection(ProfileFriend profileFriend)
          Update a connection record
 boolean updateExternalIntegrationInfo(ExternalIntegrationInfo info)
          Update a user's ExternalIntegrationInfo record
 boolean updateKudos(ProfileKudos kudos)
          Update a user's kudos record
 boolean updatePrivacyRecord(ProfilePrivacy privacy)
          Update the ProfilePrivacy record
 

Field Detail

QUERY_GET_COMPANY_PROFILE

static final String QUERY_GET_COMPANY_PROFILE
See Also:
Constant Field Values

QUERY_GET_COMPANY_PROFILES

static final String QUERY_GET_COMPANY_PROFILES
See Also:
Constant Field Values

QUERY_GET_FRIEND_REQUESTS_FOR_USER

static final String QUERY_GET_FRIEND_REQUESTS_FOR_USER
See Also:
Constant Field Values

QUERY_GET_CONFIRMED_FRIEND_USERIDS_FOR_USER

static final String QUERY_GET_CONFIRMED_FRIEND_USERIDS_FOR_USER
See Also:
Constant Field Values

QUERY_GET_FRIEND_REQUEST

static final String QUERY_GET_FRIEND_REQUEST
See Also:
Constant Field Values

QUERY_GET_FRIEND_RECORD

static final String QUERY_GET_FRIEND_RECORD
See Also:
Constant Field Values

QUERY_GET_USER_STATUS

static final String QUERY_GET_USER_STATUS
See Also:
Constant Field Values

QUERY_GET_PRIVACY_RECORD

static final String QUERY_GET_PRIVACY_RECORD
See Also:
Constant Field Values

QUERY_GET_CURRENT_PROFILE_IMAGE_RECORD

static final String QUERY_GET_CURRENT_PROFILE_IMAGE_RECORD
See Also:
Constant Field Values

QUERY_OTHER_PROFILE_IMAGE_RECORDS

static final String QUERY_OTHER_PROFILE_IMAGE_RECORDS
See Also:
Constant Field Values

QUERY_GET_STATUS_UPDATES_COUNT

static final String QUERY_GET_STATUS_UPDATES_COUNT
See Also:
Constant Field Values

QUERY_GET_GALLERY_IMAGE_RECORDS

static final String QUERY_GET_GALLERY_IMAGE_RECORDS
See Also:
Constant Field Values

QUERY_GET_GALLERY_RECORD

static final String QUERY_GET_GALLERY_RECORD
See Also:
Constant Field Values

QUERY_GET_GALLERY_IMAGE_RECORDS_COUNT

static final String QUERY_GET_GALLERY_IMAGE_RECORDS_COUNT
See Also:
Constant Field Values

QUERY_GET_PREFERENCES_RECORD

static final String QUERY_GET_PREFERENCES_RECORD
See Also:
Constant Field Values

QUERY_GET_SOCIAL_NETWORKING_INFO

static final String QUERY_GET_SOCIAL_NETWORKING_INFO
See Also:
Constant Field Values

QUERY_GET_EXTERNAL_IMAGE_RECORD

static final String QUERY_GET_EXTERNAL_IMAGE_RECORD
See Also:
Constant Field Values

QUERY_FIND_SAKAI_PERSONS_BY_NAME_OR_EMAIL

static final String QUERY_FIND_SAKAI_PERSONS_BY_NAME_OR_EMAIL
See Also:
Constant Field Values

QUERY_FIND_SAKAI_PERSONS_BY_INTEREST

static final String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST
See Also:
Constant Field Values

QUERY_FIND_SAKAI_PERSONS_BY_INTEREST_AND_BUSINESS_BIO

static final String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST_AND_BUSINESS_BIO
See Also:
Constant Field Values

QUERY_GET_SAKAI_PERSON

static final String QUERY_GET_SAKAI_PERSON
See Also:
Constant Field Values

QUERY_GET_ALL_SAKAI_PERSON_IDS

static final String QUERY_GET_ALL_SAKAI_PERSON_IDS
See Also:
Constant Field Values

QUERY_GET_ALL_SAKAI_PERSON_IDS_COUNT

static final String QUERY_GET_ALL_SAKAI_PERSON_IDS_COUNT
See Also:
Constant Field Values

QUERY_GET_OFFICIAL_IMAGE_RECORD

static final String QUERY_GET_OFFICIAL_IMAGE_RECORD
See Also:
Constant Field Values

QUERY_GET_ALL_UNREAD_MESSAGES_COUNT

static final String QUERY_GET_ALL_UNREAD_MESSAGES_COUNT
See Also:
Constant Field Values

QUERY_GET_THREADS_WITH_UNREAD_MESSAGES_COUNT

static final String QUERY_GET_THREADS_WITH_UNREAD_MESSAGES_COUNT
See Also:
Constant Field Values

QUERY_GET_MESSAGES_IN_THREAD

static final String QUERY_GET_MESSAGES_IN_THREAD
See Also:
Constant Field Values

QUERY_GET_MESSAGES_IN_THREAD_COUNT

static final String QUERY_GET_MESSAGES_IN_THREAD_COUNT
See Also:
Constant Field Values

QUERY_GET_MESSAGE

static final String QUERY_GET_MESSAGE
See Also:
Constant Field Values

QUERY_GET_LATEST_MESSAGE_IN_THREAD

static final String QUERY_GET_LATEST_MESSAGE_IN_THREAD
See Also:
Constant Field Values

QUERY_GET_MESSAGE_THREADS

static final String QUERY_GET_MESSAGE_THREADS
See Also:
Constant Field Values

QUERY_GET_MESSAGE_THREADS_COUNT

static final String QUERY_GET_MESSAGE_THREADS_COUNT
See Also:
Constant Field Values

QUERY_GET_SENT_MESSAGES_COUNT

static final String QUERY_GET_SENT_MESSAGES_COUNT
See Also:
Constant Field Values

QUERY_GET_MESSAGE_THREAD

static final String QUERY_GET_MESSAGE_THREAD
See Also:
Constant Field Values

QUERY_GET_MESSAGE_PARTICIPANT_FOR_MESSAGE_AND_UUID

static final String QUERY_GET_MESSAGE_PARTICIPANT_FOR_MESSAGE_AND_UUID
See Also:
Constant Field Values

QUERY_GET_THREAD_PARTICIPANTS

static final String QUERY_GET_THREAD_PARTICIPANTS
See Also:
Constant Field Values

QUERY_GET_KUDOS_RECORD

static final String QUERY_GET_KUDOS_RECORD
See Also:
Constant Field Values

QUERY_GET_EXTERNAL_INTEGRATION_INFO

static final String QUERY_GET_EXTERNAL_INTEGRATION_INFO
See Also:
Constant Field Values

QUERY_GET_WALL_ITEMS

static final String QUERY_GET_WALL_ITEMS
See Also:
Constant Field Values

USER_UUID

static final String USER_UUID
See Also:
Constant Field Values

FRIEND_UUID

static final String FRIEND_UUID
See Also:
Constant Field Values

CONFIRMED

static final String CONFIRMED
See Also:
Constant Field Values

OLDEST_STATUS_DATE

static final String OLDEST_STATUS_DATE
See Also:
Constant Field Values

SEARCH

static final String SEARCH
See Also:
Constant Field Values

UUID

static final String UUID
See Also:
Constant Field Values

ID

static final String ID
See Also:
Constant Field Values

THREAD

static final String THREAD
See Also:
Constant Field Values

MESSAGE_ID

static final String MESSAGE_ID
See Also:
Constant Field Values
Method Detail

getRequestedConnectionUserIdsForUser

List<String> getRequestedConnectionUserIdsForUser(String userId)
Get a list of unconfirmed Friend requests for a given user. Uses a native SQL query Returns: (all those where userId is the friend_uuid and confirmed=false)

Parameters:
userId - uuid of the user to retrieve the list of friends for

getConfirmedConnectionUserIdsForUser

List<String> getConfirmedConnectionUserIdsForUser(String userId)
Get a list of confirmed connections for a given user. Uses a native SQL query so we can use unions Returns: (all those where userId is the user_uuid and confirmed=true) & (all those where user is friend_uuid and confirmed=true) This only returns userIds. If you want a list of Person objects, see getConnectionsForUser()

Parameters:
userId - uuid of the user to retrieve the list of friends for

findSakaiPersonsByNameOrEmail

List<String> findSakaiPersonsByNameOrEmail(String search)
Get a list of all userIds that match the search criteria in name or email

Parameters:
search - string to search on
Returns:

findSakaiPersonsByInterest

List<String> findSakaiPersonsByInterest(String search,
                                        boolean includeBusinessBio)
Get a list of all userIds that match the search criteria in the interest fields.

Parameters:
search - string to search on
includeBusinessBio - true if the business biography should also be searched.
Returns:

getCurrentProfileImageRecords

List<ProfileImageUploaded> getCurrentProfileImageRecords(String userId)
Get the current ProfileImage records from the database. There should only ever be one, but in case things get out of sync this returns all. This method is only used when we are adding a new image as we need to invalidate all of the others If you are just wanting to retrieve the latest image, see getCurrentProfileImageRecord()

Parameters:
userId - userId of the user

getCurrentProfileImageRecord

ProfileImageUploaded getCurrentProfileImageRecord(String userId)
Get the current ProfileImage record from the database. There should only ever be one, but if there are more this will return the latest. This is called when retrieving a profile image for a user. When adding a new image, there is a call to a private method called getCurrentProfileImageRecords() which should invalidate any multiple current images

Parameters:
userId - userId of the user

getOtherProfileImageRecords

List<ProfileImageUploaded> getOtherProfileImageRecords(String userId)
Get old ProfileImage records from the database. TODO: Used for displaying old the profile pictures album

Parameters:
userId - userId of the user

getOfficialImageRecordForUser

ProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
Get the ProfileImageOfficial record from the database for the given user

Parameters:
userUuid - uuid of the user
Returns:

saveOfficialImageUrl

boolean saveOfficialImageUrl(ProfileImageOfficial officialImage)
Save the ProfileImageOfficial record the database

Parameters:
officialImage - ProfileImageOfficial object
Returns:

getConnectionRecord

ProfileFriend getConnectionRecord(String userId,
                                  String friendId)
Get a connection record for a user/friend pair

This tries both column arrangements, ie user/friend and friend/user

Parameters:
userId - uuid of the user
friendId - uuid of the other user
Returns:

addNewConnection

boolean addNewConnection(ProfileFriend profileFriend)
Save a new connection record

Parameters:
profileFriend - ProfileFriend record
Returns:

updateConnection

boolean updateConnection(ProfileFriend profileFriend)
Update a connection record

Parameters:
profileFriend - ProfileFriend record
Returns:

removeConnection

boolean removeConnection(ProfileFriend profileFriend)
Remove a connection record

Parameters:
profileFriend - ProfileFriend record
Returns:

getPendingConnection

ProfileFriend getPendingConnection(String userId,
                                   String friendId)
Get a connection record that is pending

Parameters:
userId - uuid of the user
friendId - uuid of the friend
Returns:

getUserStatus

ProfileStatus getUserStatus(String userId,
                            Date oldestStatusDate)
Get a ProfileStatus record for a user, but only if the date of the record is within the given time

Parameters:
userId - uuid of the user
oldestStatusDate - oldest date to search until
Returns:

setUserStatus

boolean setUserStatus(ProfileStatus profileStatus)
Set the status for a user

Parameters:
profileStatus - ProfileStatus object
Returns:

clearUserStatus

boolean clearUserStatus(ProfileStatus profileStatus)
Remove the ProfileStatus record for a user

Parameters:
profileStatus - ProfileStatus object
Returns:

getStatusUpdatesCount

int getStatusUpdatesCount(String userUuid)
Get a count of all status updates for a user

Parameters:
userUuid - uuid of the user
Returns:

addNewPrivacyRecord

ProfilePrivacy addNewPrivacyRecord(ProfilePrivacy privacy)
Add a new ProfilePrivacy record

Parameters:
privacy - ProfilePrivacy object
Returns:

getPrivacyRecord

ProfilePrivacy getPrivacyRecord(String userId)
Get the ProfilePrivacy record for the user

Parameters:
userId - uuid of the user
Returns:

updatePrivacyRecord

boolean updatePrivacyRecord(ProfilePrivacy privacy)
Update the ProfilePrivacy record

Parameters:
privacy - ProfilePrivacy object
Returns:

addNewCompanyProfile

boolean addNewCompanyProfile(CompanyProfile companyProfile)
Save a new CompanyProfile record

Parameters:
companyProfile - CompanyProfile record
Returns:

updateCompanyProfile

boolean updateCompanyProfile(CompanyProfile companyProfile)
Update a CompanyProfile record

Parameters:
companyProfile - CompanyProfile record
Returns:

getCompanyProfile

CompanyProfile getCompanyProfile(String userId,
                                 long companyProfileId)
Get the CompanyProfile record for a user and company ID

Parameters:
userId - uuid of the user
companyProfileId - id of the company
Returns:

getCompanyProfiles

List<CompanyProfile> getCompanyProfiles(String userId)
Get all CompanyProfile records for a user

Parameters:
userId - uuid of the user
Returns:

removeCompanyProfile

boolean removeCompanyProfile(CompanyProfile companyProfile)
Remove a CompanyProfile record

Parameters:
companyProfile - CompanyProfile record
Returns:

addNewGalleryImage

boolean addNewGalleryImage(GalleryImage galleryImage)
Add a new GalleryImage record

Parameters:
galleryImage - GalleryImage record
Returns:

getGalleryImageRecord

GalleryImage getGalleryImageRecord(String userId,
                                   long imageId)
Get the GalleryImage record for a user and image ID

Parameters:
userId - uuid of the user
imageId - id of the image
Returns:

getGalleryImages

List<GalleryImage> getGalleryImages(String userId)
Get all GalleryImage records for a user

Parameters:
userId - uuid of the user
Returns:

removeGalleryImage

boolean removeGalleryImage(GalleryImage galleryImage)
Remove a GalleryImage record

Parameters:
galleryImage - GalleryImage record
Returns:

getGalleryImagesCount

int getGalleryImagesCount(String userUuid)
Get a count of all gallery images that a user has

Parameters:
userUuid - uuid of the user
Returns:

getSocialNetworkingInfo

SocialNetworkingInfo getSocialNetworkingInfo(String userId)
Get a SocialNetworkingInfo record for a user

Parameters:
userId - uuid of the user
Returns:

saveSocialNetworkingInfo

boolean saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
Save a SocialNetworkingInfo record

Parameters:
socialNetworkingInfo - SocialNetworkingInfo object
Returns:

addNewProfileImage

boolean addNewProfileImage(ProfileImageUploaded profileImage)
Add a new profile image record to the database. Invalidates others before it adds itself.

Parameters:
profileImage - ProfileImageUploaded obj

getAllSakaiPersonIds

List<String> getAllSakaiPersonIds()
Get a list of uuids for all users that have a SakaiPerson record

Returns:
list of uuids

getAllSakaiPersonIdsCount

int getAllSakaiPersonIdsCount()
Get a total count of all users with SakaiPerson records

Returns:
count

getExternalImageRecordForUser

ProfileImageExternal getExternalImageRecordForUser(String userId)
Get a ProfileImageExternal record for a user

Parameters:
userId - uuid of the user
Returns:

saveExternalImage

boolean saveExternalImage(ProfileImageExternal externalImage)
Save a ProfileImageExternal record

Parameters:
externalImage - ProfileImageExternal record
Returns:

addNewPreferencesRecord

ProfilePreferences addNewPreferencesRecord(ProfilePreferences prefs)
Persist a new ProfilePreferences record and return it.

Parameters:
prefs - complete ProfilePreferences record

getPreferencesRecordForUser

ProfilePreferences getPreferencesRecordForUser(String userId)
Get a ProfilePreferences record for the user

Parameters:
userId - uuid for the user
Returns:

savePreferencesRecord

boolean savePreferencesRecord(ProfilePreferences prefs)
Save a ProfilePreferences record

Parameters:
prefs - ProfilePreferences record
Returns:

getAllUnreadMessagesCount

int getAllUnreadMessagesCount(String userId)
Get a count of all unread messages for a user

Parameters:
userId - uuid of the user
Returns:

getThreadsWithUnreadMessagesCount

int getThreadsWithUnreadMessagesCount(String userId)
Get a count of all threads with unread messages for a user

Parameters:
userId - uuid of the user
Returns:

getSentMessagesCount

int getSentMessagesCount(String userId)
Get a count of all sent messages for a user

Parameters:
userId - uuid of the user
Returns:

getMessageThreads

List<MessageThread> getMessageThreads(String userId)
Get a list of MessageThreads for a user

Parameters:
userId - uuid of the user
Returns:

getMessageThreadsCount

int getMessageThreadsCount(String userId)
Get a count of all message threads for a user

Parameters:
userId - uuid of the user
Returns:

getMessagesInThread

List<Message> getMessagesInThread(String threadId)
Get a list of all Messages in a given thread

Parameters:
threadId - id of the thread
Returns:

getMessagesInThreadCount

int getMessagesInThreadCount(String threadId)
Get a count of all Messages in a given thread

Parameters:
threadId - id of the thread
Returns:

getMessage

Message getMessage(String id)
Get a Message record

Parameters:
id - uuid of the Message
Returns:

getMessageThread

MessageThread getMessageThread(String threadId)
Get a MessageThread record

Parameters:
threadId - id of the thread
Returns:

getLatestMessageInThread

Message getLatestMessageInThread(String threadId)
Get the latest Message in a MessageThread

Parameters:
threadId - id of the thread
Returns:

toggleMessageRead

boolean toggleMessageRead(MessageParticipant participant,
                          boolean status)
Toggle a Message as being read by the given participant

Parameters:
participant - MessageParticipant
status - true/false for read/unread
Returns:

getMessageParticipant

MessageParticipant getMessageParticipant(String messageId,
                                         String userUuid)
Get a MessageParticipant record for the given message and user id

Parameters:
messageId - uuid of the message
userUuid - uuid of the user
Returns:

getThreadParticipants

List<String> getThreadParticipants(String threadId)
Get a list of uuids of all perticipants in a thread

Parameters:
threadId - id of the thread
Returns:

saveNewThread

void saveNewThread(MessageThread thread)
Save a MessageThread record

Parameters:
thread - MessageThread object

saveNewMessage

void saveNewMessage(Message message)
Save a Message record

Parameters:
thread - Message object

saveNewMessageParticipant

void saveNewMessageParticipant(MessageParticipant participant)
Save a MessageParticipant record

Parameters:
thread - MessageParticipant object

saveNewMessageParticipants

void saveNewMessageParticipants(List<MessageParticipant> participants)
Save a list of MessageParticipants

Parameters:
participants - List of MessageParticipant objects

getUserProfiles

List<UserProfile> getUserProfiles(int start,
                                  int count)
Get a list of UserProfiles withing the given pageing parameters

Parameters:
start - first record
count - total number of records
Returns:

getKudos

ProfileKudos getKudos(String userUuid)
Get the kudos record for a user

Parameters:
userUuid -
Returns:
ProfileKudos record, or null

updateKudos

boolean updateKudos(ProfileKudos kudos)
Update a user's kudos record

Parameters:
kudos - ProfileKudos for the user
Returns:

getExternalIntegrationInfo

ExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
Get the ExternalIntegrationInfo record for a user

Parameters:
userUuid -
Returns:

updateExternalIntegrationInfo

boolean updateExternalIntegrationInfo(ExternalIntegrationInfo info)
Update a user's ExternalIntegrationInfo record

Parameters:
info - ExternalIntegrationInfo for the user
Returns:

addNewWallItemForUser

boolean addNewWallItemForUser(String userUuid,
                              WallItem item)
Adds a wall item for the specified user.

Parameters:
userUuid - the user ID.
item - the wall item to add.
Returns:
true on success, false on failure.

removeWallItemFromWall

boolean removeWallItemFromWall(WallItem item)
Removes a wall item.

Parameters:
item - the wall item to remove.
Returns:
true on success, false on failure.

getWallItemsForUser

List<WallItem> getWallItemsForUser(String userUuid)
Retrieves all wall items for the specified user.

Parameters:
userUuid - the user ID.
Returns:
the wall items for the specified user.

addNewCommentToWallItem

boolean addNewCommentToWallItem(WallItemComment wallItemComment)
Adds a new wall item comment.

Parameters:
wallItemComment - the wall item comment to add.
Returns:
true if the add is successful and false if the add fails.


Copyright © 2008-2012 The Sakai Foundation. All Rights Reserved.