@Internal
public interface UserApplicationHelper
Modifier and Type | Interface and Description |
---|---|
static class |
UserApplicationHelper.ApplicationSelection |
static class |
UserApplicationHelper.ValidationScope
What should be the validation scope, all type of problems or just the seat count
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUserLogin(ApplicationUser applicationUser)
Check if given user can login to JIRA.
|
List<UserApplicationHelper.ApplicationSelection> |
getApplicationsForSelection(Set<com.atlassian.application.api.ApplicationKey> selectedApplicationKeys,
Optional<Long> directoryId)
Return the
ApplicationSelection calculated from the current state of JIRA. |
List<UserApplicationHelper.ApplicationSelection> |
getApplicationsForUser(ApplicationUser user)
Return the
ApplicationSelection calculated from the current state of JIRA for given (@code ApplicationUser). |
List<GroupView> |
getUserGroups(ApplicationUser applicationUser)
Return the list of
com.atlassian.jira.bc.user.GroupView connected with the given user. |
Collection<String> |
validateApplicationKeys(ApplicationUser user,
Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
Validates if adding a user with given application access to given applications won't exceed license limit
|
Collection<String> |
validateApplicationKeys(Optional<Long> directoryId,
Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
Validates if creating a user with given application access in given directory won't exceed license limit
|
Collection<String> |
validateApplicationKeys(Optional<Long> directoryId,
Set<com.atlassian.application.api.ApplicationKey> applicationKeys,
EnumSet<UserApplicationHelper.ValidationScope> validationScope)
Validates if creating a user with given application access in given directory won't cause issues defined in
UserApplicationHelper.ValidationScope |
Collection<String> |
validateDefaultApplications(EnumSet<UserApplicationHelper.ValidationScope> validationScope,
Optional<Long> directoryId)
Validates if creating a user with default application access in given directory won't exceed license limit
|
@Nonnull List<UserApplicationHelper.ApplicationSelection> getApplicationsForSelection(@Nonnull Set<com.atlassian.application.api.ApplicationKey> selectedApplicationKeys, @Nonnull Optional<Long> directoryId)
ApplicationSelection
calculated from the current state of JIRA. The passed
applications are marked as selected (if they exist). The returned list will be ordered based on the Application
name except that JIRA Core will be returned last (if it exists).selectedApplicationKeys
- the set of application keys to mark as selected.directoryId
- optional directoryId to use for application selectionApplicationSelection
ordered by their name except that JIRA Core is always
last.@Nonnull List<UserApplicationHelper.ApplicationSelection> getApplicationsForUser(@Nonnull ApplicationUser user)
ApplicationSelection
calculated from the current state of JIRA for given (@code ApplicationUser).user
- subject application user to get applications for.ApplicationSelection
ordered by their name except that JIRA Core is always
last.@Nonnull List<GroupView> getUserGroups(@Nonnull ApplicationUser applicationUser)
com.atlassian.jira.bc.user.GroupView
connected with the given user.
It respects nested groups.applicationUser
- the usercom.atlassian.jira.bc.user.GroupView
@Nonnull Collection<String> validateDefaultApplications(EnumSet<UserApplicationHelper.ValidationScope> validationScope, Optional<Long> directoryId)
directoryId
- the Directory ID, or Optional.empty()
if default directory should be checked@Nonnull Collection<String> validateApplicationKeys(@Nonnull Optional<Long> directoryId, @Nonnull Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
directoryId
- the Directory ID, or Optional.empty()
if default directory should be checkedapplicationKeys
- validated application keys@Nonnull Collection<String> validateApplicationKeys(@Nonnull Optional<Long> directoryId, @Nonnull Set<com.atlassian.application.api.ApplicationKey> applicationKeys, @Nonnull EnumSet<UserApplicationHelper.ValidationScope> validationScope)
UserApplicationHelper.ValidationScope
directoryId
- the Directory ID, or Optional.empty()
if default directory should be checkedapplicationKeys
- validated application keysvalidationScope
- required validation scope@Nonnull Collection<String> validateApplicationKeys(@Nonnull ApplicationUser user, @Nonnull Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
user
- validated userapplicationKeys
- validated application keysboolean canUserLogin(@Nullable ApplicationUser applicationUser)
applicationUser
- given userCopyright © 2002-2017 Atlassian. All Rights Reserved.