com.atlassian.jira.issue.watchers
Class DefaultIssueWatcherAccessor

java.lang.Object
  extended by com.atlassian.jira.issue.watchers.DefaultIssueWatcherAccessor
All Implemented Interfaces:
IssueWatcherAccessor

public class DefaultIssueWatcherAccessor
extends java.lang.Object
implements IssueWatcherAccessor


Constructor Summary
DefaultIssueWatcherAccessor(WatcherManager voteManager)
           
 
Method Summary
 java.lang.Iterable<com.opensymphony.user.User> getDetails(java.util.Locale displayLocale, Issue issue)
          Convenience function that simply returns the User objects.
<T> java.lang.Iterable<T>
getDetails(java.util.Locale displayLocale, Issue issue, Function<com.opensymphony.user.User,T> transformer)
          Return an Iterable of all watchers for the supplied issue.
 boolean isWatchingEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIssueWatcherAccessor

public DefaultIssueWatcherAccessor(WatcherManager voteManager)
Method Detail

getDetails

public <T> java.lang.Iterable<T> getDetails(java.util.Locale displayLocale,
                                            Issue issue,
                                            Function<com.opensymphony.user.User,T> transformer)
Description copied from interface: IssueWatcherAccessor
Return an Iterable of all watchers for the supplied issue. The elements are of the type the transformer function returns.

Specified by:
getDetails in interface IssueWatcherAccessor
Type Parameters:
T - the type of element in the returned iterable.
Parameters:
displayLocale - for sorting.
issue - the issue to get the watchers for
transformer - to get the required details from the User objects.
Returns:
an Iterable of the user details, empty if no watchers

getDetails

public java.lang.Iterable<com.opensymphony.user.User> getDetails(java.util.Locale displayLocale,
                                                                 Issue issue)
Description copied from interface: IssueWatcherAccessor
Convenience function that simply returns the User objects.

Specified by:
getDetails in interface IssueWatcherAccessor
Parameters:
displayLocale - for sorting.
issue - the issue to get the watchers for
Returns:
an Iterable of the users, empty if no watchers

isWatchingEnabled

public boolean isWatchingEnabled()
Specified by:
isWatchingEnabled in interface IssueWatcherAccessor


Copyright © 2002-2011 Atlassian. All Rights Reserved.