com.atlassian.confluence.userstatus
Class DefaultUserStatusManager

java.lang.Object
  extended by com.atlassian.confluence.core.DefaultContentEntityManager
      extended by com.atlassian.confluence.userstatus.DefaultUserStatusManager
All Implemented Interfaces:
ContentEntityManager, UserStatusManager

public class DefaultUserStatusManager
extends DefaultContentEntityManager
implements UserStatusManager


Field Summary
 
Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager
attachmentManager, contentEntityObjectDao, eventManager, hibernateSessionManager, indexer, labelManager, linkManager
 
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager
ITERATE_ALL
 
Constructor Summary
DefaultUserStatusManager(UserStatusDao userStatusDao)
           
 
Method Summary
 void clearCurrentUserStatus(String username)
          Clears the current status of the specified user
 void clearCurrentUserStatus(com.atlassian.user.User user)
          Clears the current status of the specified user
 UserStatus getUserStatus(long id)
          Retrieve the user status for the given status id
 UserStatus getUserStatus(String username)
          Retrieve the current user status for the given user
 UserStatus getUserStatus(com.atlassian.user.User user)
          Retrieve the current user status for the given user
 int getUserStatusCount(String username)
          Returns the total number of statuses set against the specified user
 int getUserStatusCount(com.atlassian.user.User user)
          Returns the total number of statuses set against the specified user
 List<UserStatus> getUserStatusList(String username)
          Retrieve a list of user status items for the specified user
 List<UserStatus> getUserStatusList(String username, int maxResults)
          Retrieve a list of user status items for the specified user
 List<UserStatus> getUserStatusList(com.atlassian.user.User user)
          Retrieve a list of user status items for the specified user
 List<UserStatus> getUserStatusList(com.atlassian.user.User user, int maxResults)
          Retrieve a list of user status items for the specified user
protected  void publishCreateEvent(ContentEntityObject obj)
          This method publishes *CreateEventss.
protected  void publishRemoveEvent(ContentEntityObject obj)
          This method publishes *RemoveEvents.
protected  void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
          This method publishes *UpdateEvents.
 void removeAllStatusForUser(com.atlassian.user.User user)
          Deletes all user status' for the specified user
 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.
 UserStatus saveUserStatus(UserStatus status)
          Saves a status
 
Methods inherited from class com.atlassian.confluence.core.DefaultContentEntityManager
getAllCurrentEntities, getById, getEventManager, getNextVersion, getOtherVersion, getPageDao, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion, setAttachmentManager, setContentEntityObjectDao, setEventManager, setHibernateSessionManager, setIndexer, setLabelManager, setLinkManager, updateContentLinkingTo, updateContentLinkingTo, updateOutgoingLinksInContent, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo, updateSingleContentLinkinTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.core.ContentEntityManager
getAllCurrentEntities, getById, getNextVersion, getOtherVersion, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion, setEventManager, updateContentLinkingTo, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo
 

Constructor Detail

DefaultUserStatusManager

public DefaultUserStatusManager(UserStatusDao userStatusDao)
Method Detail

getUserStatusList

public List<UserStatus> getUserStatusList(String username)
Description copied from interface: UserStatusManager
Retrieve a list of user status items for the specified user

Specified by:
getUserStatusList in interface UserStatusManager
Parameters:
username - the username of the user to find status updates for
Returns:
a list of user status objects

getUserStatusList

public List<UserStatus> getUserStatusList(com.atlassian.user.User user)
Description copied from interface: UserStatusManager
Retrieve a list of user status items for the specified user

Specified by:
getUserStatusList in interface UserStatusManager
Parameters:
user - the user to find status updates for
Returns:
a list of user status objects

getUserStatusList

public List<UserStatus> getUserStatusList(String username,
                                          int maxResults)
Description copied from interface: UserStatusManager
Retrieve a list of user status items for the specified user

Specified by:
getUserStatusList in interface UserStatusManager
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

getUserStatusList

public List<UserStatus> getUserStatusList(com.atlassian.user.User user,
                                          int maxResults)
Description copied from interface: UserStatusManager
Retrieve a list of user status items for the specified user

Specified by:
getUserStatusList in interface UserStatusManager
Parameters:
user - the user to find status updates for
maxResults - the maximum number of statuses to return
Returns:
a list of user status objects

getUserStatus

public UserStatus getUserStatus(String username)
Description copied from interface: UserStatusManager
Retrieve the current user status for the given user

Specified by:
getUserStatus in interface UserStatusManager
Parameters:
username - the username of the user to get the status for
Returns:
user status

getUserStatus

public UserStatus getUserStatus(com.atlassian.user.User user)
Description copied from interface: UserStatusManager
Retrieve the current user status for the given user

Specified by:
getUserStatus in interface UserStatusManager
Parameters:
user - the user to get the status for
Returns:
user status

clearCurrentUserStatus

public void clearCurrentUserStatus(com.atlassian.user.User user)
Description copied from interface: UserStatusManager
Clears the current status of the specified user

Specified by:
clearCurrentUserStatus in interface UserStatusManager
Parameters:
user - - the user to clear the status for

clearCurrentUserStatus

public void clearCurrentUserStatus(String username)
Description copied from interface: UserStatusManager
Clears the current status of the specified user

Specified by:
clearCurrentUserStatus in interface UserStatusManager
Parameters:
username - - the user to clear the status for

getUserStatusCount

public int getUserStatusCount(String username)
Description copied from interface: UserStatusManager
Returns the total number of statuses set against the specified user

Specified by:
getUserStatusCount in interface UserStatusManager
Parameters:
username - the user to count statuses for
Returns:
total number of statuses set

getUserStatusCount

public int getUserStatusCount(com.atlassian.user.User user)
Description copied from interface: UserStatusManager
Returns the total number of statuses set against the specified user

Specified by:
getUserStatusCount in interface UserStatusManager
Parameters:
user - the user to count statuses for
Returns:
total number of statuses set

saveUserStatus

public UserStatus saveUserStatus(String username,
                                 String statusText)
Description copied from interface: UserStatusManager
Saves a new status.

Specified by:
saveUserStatus in interface UserStatusManager
Parameters:
username - The user to save the status against
statusText - Text for the new status
Returns:
The persisted status object

saveUserStatus

public UserStatus saveUserStatus(String username,
                                 String statusText,
                                 Space targetSpace)
Description copied from interface: UserStatusManager
Saves a new status, targetted to a specific space.

Specified by:
saveUserStatus in interface UserStatusManager
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

saveUserStatus

public UserStatus saveUserStatus(UserStatus status)
Description copied from interface: UserStatusManager
Saves a status

Specified by:
saveUserStatus in interface UserStatusManager
Parameters:
status - the status to be saved
Returns:
The status that was passed in as a parameter

getUserStatus

public UserStatus getUserStatus(long id)
Description copied from interface: UserStatusManager
Retrieve the user status for the given status id

Specified by:
getUserStatus in interface UserStatusManager
Parameters:
id - the id of the user status object
Returns:
user status

removeAllStatusForUser

public void removeAllStatusForUser(com.atlassian.user.User user)
Description copied from interface: UserStatusManager
Deletes all user status' for the specified user

Specified by:
removeAllStatusForUser in interface UserStatusManager
Parameters:
user - the user to clear the statuses for

publishCreateEvent

protected void publishCreateEvent(ContentEntityObject obj)
Description copied from class: DefaultContentEntityManager
This method publishes *CreateEventss. Specific content entity object manager that need to publish those events should override this method.

Overrides:
publishCreateEvent in class DefaultContentEntityManager
Parameters:
obj - the created content entity object

publishUpdateEvent

protected void publishUpdateEvent(ContentEntityObject obj,
                                  ContentEntityObject origObj,
                                  SaveContext saveContext)
Description copied from class: DefaultContentEntityManager
This method publishes *UpdateEvents. Specific content entity object manager that need to publish those events should override this method.

Overrides:
publishUpdateEvent in class DefaultContentEntityManager
Parameters:
obj - the updated content entity object
origObj - the old version of the content entity object, for history purpose
saveContext - the associated SaveContext

publishRemoveEvent

protected void publishRemoveEvent(ContentEntityObject obj)
Description copied from class: DefaultContentEntityManager
This method publishes *RemoveEvents. Specific content entity object manager that need to publish those events should override this method.

Overrides:
publishRemoveEvent in class DefaultContentEntityManager
Parameters:
obj - the removed content entity object


Copyright © 2003-2013 Atlassian. All Rights Reserved.