org.sakaiproject.profile2.logic
Interface ProfileStatusLogic


public interface ProfileStatusLogic

An interface for dealing with ProfileStatus in Profile2

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

Method Summary
 boolean clearUserStatus(String userId)
          Clear user status
 int getStatusUpdatesCount(String userUuid)
          Get the number of status updates this user has made.
 ProfileStatus getUserStatus(String userUuid)
          Get the status (message and date) for a user
 ProfileStatus getUserStatus(String userUuid, ProfilePrivacy privacy)
          Get the status (message and date) for a user
 boolean setUserStatus(ProfileStatus profileStatus)
          Set user status
 boolean setUserStatus(String userId, String status)
          Set user status
 

Method Detail

getUserStatus

ProfileStatus getUserStatus(String userUuid)
Get the status (message and date) for a user

Only returns a status object for those that are up to and including one week old. This could be configurable.

The privacy settings will be retrieved, and checked against the current requesting user to see if the status is allowed to be shown.

Parameters:
userUuid - uuid of the user to get their status for
Returns:
ProfileStatus or null if not allowed/none

getUserStatus

ProfileStatus getUserStatus(String userUuid,
                            ProfilePrivacy privacy)
Get the status (message and date) for a user

Only returns a status object for those that are up to and including one week old. This could be configurable.

The supplied privacy settings will be checked against the current requesting user to see if the status is allowed to be shown.

Parameters:
userUuid - uuid of the user to get their status for
privacy - ProfilePrivacy object for the user.
Returns:
ProfileStatus or null if not allowed/none

setUserStatus

boolean setUserStatus(String userId,
                      String status)
Set user status

Parameters:
userId - uuid of the user
status - status to be set

setUserStatus

boolean setUserStatus(ProfileStatus profileStatus)
Set user status

Parameters:
profileStatus - ProfileStatus object for the user

clearUserStatus

boolean clearUserStatus(String userId)
Clear user status

Parameters:
userId - uuid of the user

getStatusUpdatesCount

int getStatusUpdatesCount(String userUuid)
Get the number of status updates this user has made. Until PRFL-191 is implemented which allows multiple status updates, this will only return one.

Parameters:
userUuid - uuid of the user
Returns:


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