public class DefaultAssigneeService extends Object implements AssigneeService
AssigneeService.| Constructor and Description |
|---|
DefaultAssigneeService(PermissionContextFactory permissionContextFactory,
PermissionSchemeManager permissionSchemeManager,
UserHistoryManager userHistoryManager,
FeatureManager featureManager,
JiraAuthenticationContext authenticationContext,
UserKeyService userKeyService) |
| Modifier and Type | Method and Description |
|---|---|
Collection<com.atlassian.crowd.embedded.api.User> |
findAssignableUsers(String query,
Issue issue,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get assignable Users based on a query string and issue.
|
Collection<com.atlassian.crowd.embedded.api.User> |
findAssignableUsers(String query,
Project project)
Get assignable Users based on a query string and project.
|
List<com.atlassian.crowd.embedded.api.User> |
getAssignableUsers(Collection<Issue> issues,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get all
Users that may have all of the given Issues assigned to them, for a
given workflow state. |
List<com.atlassian.crowd.embedded.api.User> |
getAssignableUsers(Issue issue,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get all
Users that may have an Issue assigned to them, for a given workflow state. |
Set<String> |
getRecentAssigneeKeysForIssue(Issue issue)
Gets ids of this issue's recent assignees, including the current assignee.
|
Set<String> |
getRecentAssigneeKeysForUser(com.atlassian.crowd.embedded.api.User remoteUser)
Get users keys that the given user has recently assigned issues to.
|
Set<String> |
getRecentAssigneeNamesForIssue(Issue issue)
Gets the names of this issue's recent assignees, including the current assignee.
|
Set<String> |
getRecentAssigneeNamesForUser(com.atlassian.crowd.embedded.api.User remoteUser)
Get users names that the given user has recently assigned issues to.
|
List<com.atlassian.crowd.embedded.api.User> |
getSuggestedAssignees(Issue issue,
com.atlassian.crowd.embedded.api.User loggedInUser,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Returns a list of suggested Assignee
Users for a given Issue and logged-in User. |
List<com.atlassian.crowd.embedded.api.User> |
getSuggestedAssignees(Issue issue,
com.atlassian.crowd.embedded.api.User loggedInUser,
List<com.atlassian.crowd.embedded.api.User> assignableUsers)
Returns a list of suggested Assignee
Users for a given Issue and logged-in User. |
List<com.atlassian.crowd.embedded.api.User> |
getSuggestedAssignees(Set<String> suggestedAssigneeNames,
List<com.atlassian.crowd.embedded.api.User> assignableUsers)
Given a set of suggested names and an ordered list of assignable users, returns an order list of suggested users.
|
Map<String,Boolean> |
makeUniqueFullNamesMap(Collection<com.atlassian.crowd.embedded.api.User> users)
Converts a collection of Users to a Map where the key is the User full name and the value is true or false.
|
public DefaultAssigneeService(PermissionContextFactory permissionContextFactory, PermissionSchemeManager permissionSchemeManager, UserHistoryManager userHistoryManager, FeatureManager featureManager, JiraAuthenticationContext authenticationContext, UserKeyService userKeyService)
public List<com.atlassian.crowd.embedded.api.User> getSuggestedAssignees(Issue issue, @Nullable com.atlassian.crowd.embedded.api.User loggedInUser, @Nullable com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
AssigneeServiceUsers for a given Issue and logged-in User.
This version accepts a pre-populated list of assignable Users to filter.
getSuggestedAssignees in interface AssigneeServiceissue - Issue to get suggested Assignees forloggedInUser - the user getting the suggestions, whose Assignee history may be queriedactionDescriptor - workflow action descriptor to filter users onUser objects deemed relevant to the given Issue and User, sorted by UserBestNameComparatorpublic List<com.atlassian.crowd.embedded.api.User> getSuggestedAssignees(Issue issue, com.atlassian.crowd.embedded.api.User loggedInUser, List<com.atlassian.crowd.embedded.api.User> assignableUsers)
AssigneeServiceUsers for a given Issue and logged-in User.
This version accepts a pre-populated list of assignable Users to filter.
getSuggestedAssignees in interface AssigneeServiceissue - Issue to get suggested Assignees forloggedInUser - the user getting the suggestions, whose Assignee history may be queriedassignableUsers - a list of Users to filterUser objects deemed relevant to the given Issue and User.public Collection<com.atlassian.crowd.embedded.api.User> findAssignableUsers(String query, Issue issue, @Nullable com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
AssigneeServiceMatches on the start of username, Each word in Full Name & email.
Results are sorted according to the UserCachingComparator.
findAssignableUsers in interface AssigneeServicequery - String to search for.issue - Issue to check Assignee permissions againstactionDescriptor - an ActionDescriptor describing the context in which the Assignee is being searchedUser objects that match criteria.public Collection<com.atlassian.crowd.embedded.api.User> findAssignableUsers(String query, Project project)
AssigneeServiceMatches on the start of username, Each word in Full Name & email.
Results are sorted according to the UserCachingComparator.
findAssignableUsers in interface AssigneeServicequery - String to search for.project - Project check Assignee permissions againstUser objects that match criteria.public List<com.atlassian.crowd.embedded.api.User> getSuggestedAssignees(Set<String> suggestedAssigneeNames, List<com.atlassian.crowd.embedded.api.User> assignableUsers)
getSuggestedAssignees in interface AssigneeServicesuggestedAssigneeNames - the names of the users to returnassignableUsers - a list of Users to filter by the suggested assignee namespublic List<com.atlassian.crowd.embedded.api.User> getAssignableUsers(Issue issue, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
AssigneeServiceUsers that may have an Issue assigned to them, for a given workflow state.
The ActionDescriptor may be used to check for workflow states that only allow a subset of
normally-assignable users.
getAssignableUsers in interface AssigneeServiceissue - the Issue to find assignable users foractionDescriptor - workflow action descriptor to filter users onpublic List<com.atlassian.crowd.embedded.api.User> getAssignableUsers(Collection<Issue> issues, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
AssigneeServiceUsers that may have all of the given Issues assigned to them, for a
given workflow state.
The ActionDescriptor may be used to check for workflow states that only allow a subset of
normally-assignable users.
Note: This method is exactly equivalent to AssigneeService.getAssignableUsers(Issue, ActionDescriptor),
but returns only those users that are assignable for all of the issues. This is
significantly more efficient than calling AssigneeService.getAssignableUsers(Issue, ActionDescriptor)
multiple times and filtering the lists yourself.
getAssignableUsers in interface AssigneeServiceissues - the Issues to find assignable users foractionDescriptor - workflow action descriptor to filter users onpublic Set<String> getRecentAssigneeKeysForIssue(Issue issue)
getRecentAssigneeKeysForIssue in interface AssigneeServiceissue - an issue to get the change history ofAssigneeService.getRecentAssigneeNamesForIssue(com.atlassian.jira.issue.Issue)public Set<String> getRecentAssigneeNamesForIssue(Issue issue)
getRecentAssigneeNamesForIssue in interface AssigneeServiceissue - an issue to get the change history ofAssigneeService.getRecentAssigneeKeysForIssue(com.atlassian.jira.issue.Issue)public Map<String,Boolean> makeUniqueFullNamesMap(Collection<com.atlassian.crowd.embedded.api.User> users)
AssigneeServiceThe value will be true if no other user with that exact full name exists. The value will be false if at least one other user with that exact full name exists.
makeUniqueFullNamesMap in interface AssigneeServiceusers - a collection of Users that may contain multiple users with the same full namepublic Set<String> getRecentAssigneeNamesForUser(com.atlassian.crowd.embedded.api.User remoteUser)
getRecentAssigneeNamesForUser in interface AssigneeServiceremoteUser - a Userpublic Set<String> getRecentAssigneeKeysForUser(com.atlassian.crowd.embedded.api.User remoteUser)
getRecentAssigneeKeysForUser in interface AssigneeServiceremoteUser - a UserCopyright © 2002-2015 Atlassian. All Rights Reserved.