public class

DefaultUserStatusManager

extends DefaultContentEntityManager
implements UserStatusManager
java.lang.Object
   ↳ com.atlassian.confluence.core.DefaultContentEntityManager
     ↳ com.atlassian.confluence.userstatus.DefaultUserStatusManager

Summary

[Expand]
Inherited Constants
From interface com.atlassian.confluence.core.ContentEntityManager
[Expand]
Inherited Fields
From class com.atlassian.confluence.core.DefaultContentEntityManager
Public Constructors
DefaultUserStatusManager(UserStatusDao userStatusDao)
Public Methods
void clearCurrentUserStatus(String username)
Clears the current status of the specified user
void clearCurrentUserStatus(User user)
Clears the current status of the specified user
UserStatus getUserStatus(String username)
Retrieve the current user status for the given user
UserStatus getUserStatus(User user)
Retrieve the current user status for the given user
UserStatus getUserStatus(long id)
Retrieve the user status for the given status id
int getUserStatusCount(User user)
Returns the total number of statuses set against the specified user
int getUserStatusCount(String username)
Returns the total number of statuses set against the specified user
List<UserStatus> getUserStatusList(String username, int maxResults)
Retrieve a list of user status items for the specified user
List<UserStatus> getUserStatusList(User user, int maxResults)
Retrieve a list of user status items for the specified user
List<UserStatus> getUserStatusList(User user)
Retrieve a list of user status items for the specified user
List<UserStatus> getUserStatusList(String username)
Retrieve a list of user status items for the specified user
void removeAllStatusForUser(User user)
Deletes all user status' for the specified user
UserStatus saveUserStatus(UserStatus status)
Saves a status
UserStatus saveUserStatus(String username, String statusText)
Saves a new status.
UserStatus saveUserStatus(String username, String statusText, Space targetSpace)
Saves a new status, targetted to a specific space.
Protected Methods
void publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEventss.
void publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvents.
void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
This method publishes *UpdateEvents.
[Expand]
Inherited Methods
From class com.atlassian.confluence.core.DefaultContentEntityManager
From class java.lang.Object
From interface com.atlassian.confluence.core.ContentEntityManager
From interface com.atlassian.confluence.userstatus.UserStatusManager

Public Constructors

public DefaultUserStatusManager (UserStatusDao userStatusDao)

Public Methods

public void clearCurrentUserStatus (String username)

Clears the current status of the specified user

Parameters
username - the user to clear the status for

public void clearCurrentUserStatus (User user)

Clears the current status of the specified user

Parameters
user - the user to clear the status for

public UserStatus getUserStatus (String username)

Retrieve the current user status for the given user

Parameters
username the username of the user to get the status for
Returns
  • user status

public UserStatus getUserStatus (User user)

Retrieve the current user status for the given user

Parameters
user the user to get the status for
Returns
  • user status

public UserStatus getUserStatus (long id)

Retrieve the user status for the given status id

Parameters
id the id of the user status object
Returns
  • user status

public int getUserStatusCount (User user)

Returns the total number of statuses set against the specified user

Parameters
user the user to count statuses for
Returns
  • total number of statuses set

public int getUserStatusCount (String username)

Returns the total number of statuses set against the specified user

Parameters
username the user to count statuses for
Returns
  • total number of statuses set

public List<UserStatus> getUserStatusList (String username, int maxResults)

Retrieve a list of user status items for the specified user

Parameters
username the username of the user to find status updates for
maxResults the maximum number of statuses to return
Returns
  • a list of user status objects

public List<UserStatus> getUserStatusList (User user, int maxResults)

Retrieve a list of user status items for the specified user

Parameters
user the user to find status updates for
maxResults the maximum number of statuses to return
Returns
  • a list of user status objects

public List<UserStatus> getUserStatusList (User user)

Retrieve a list of user status items for the specified user

Parameters
user the user to find status updates for
Returns
  • a list of user status objects

public List<UserStatus> getUserStatusList (String username)

Retrieve a list of user status items for the specified user

Parameters
username the username of the user to find status updates for
Returns
  • a list of user status objects

public void removeAllStatusForUser (User user)

Deletes all user status' for the specified user

Parameters
user the user to clear the statuses for

public UserStatus saveUserStatus (UserStatus status)

Saves a status

Parameters
status the status to be saved
Returns
  • The status that was passed in as a parameter

public UserStatus saveUserStatus (String username, String statusText)

Saves a new status.

Parameters
username The user to save the status against
statusText Text for the new status
Returns
  • The persisted status object

public UserStatus saveUserStatus (String username, String statusText, Space targetSpace)

Saves a new status, targetted to a specific space.

Parameters
username The user to save the status against
statusText Text for the new status
targetSpace The space to target the status to
Returns
  • The persisted status object

Protected Methods

protected void publishCreateEvent (ContentEntityObject obj)

This method publishes *CreateEventss. Specific content entity object manager that need to publish those events should override this method.

Parameters
obj the created content entity object

protected void publishRemoveEvent (ContentEntityObject obj)

This method publishes *RemoveEvents. Specific content entity object manager that need to publish those events should override this method.

Parameters
obj the removed content entity object

protected void publishUpdateEvent (ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)

This method publishes *UpdateEvents. Specific content entity object manager that need to publish those events should override this method.

Parameters
obj the updated content entity object
origObj the old version of the content entity object, for history purpose
saveContext the associated SaveContext