Package org.sakaiproject.profile2.logic
Interface ProfileStatusLogic
-
public interface ProfileStatusLogicAn interface for dealing with ProfileStatus in Profile2- Author:
- Steve Swinsburg (steve.swinsburg@gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanclearUserStatus(String userId)Clear user statusintgetStatusUpdatesCount(String userUuid)Get the number of status updates this user has made.ProfileStatusgetUserStatus(String userUuid)Get the status (message and date) for a userProfileStatusgetUserStatus(String userUuid, ProfilePrivacy privacy)Get the status (message and date) for a userbooleansetUserStatus(String userId, String status)Set user statusbooleansetUserStatus(ProfileStatus profileStatus)Set user status
-
-
-
Method Detail
-
getUserStatus
ProfileStatus getUserStatus(String userUuid)
Get the status (message and date) for a userOnly 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 userOnly 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 forprivacy- 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 userstatus- 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:
-
-