Package com.atlassian.jira.application
Class DefaultApplicationRoleAdminService
java.lang.Object
com.atlassian.jira.application.DefaultApplicationRoleAdminService
- All Implemented Interfaces:
ApplicationRoleAdminService
public class DefaultApplicationRoleAdminService
extends Object
implements ApplicationRoleAdminService
- Since:
- v6.3
-
Field Summary
Fields inherited from interface com.atlassian.jira.application.ApplicationRoleAdminService
ERROR_DEFAULT_GROUPS, ERROR_GROUPS -
Constructor Summary
ConstructorsConstructorDescriptionDefaultApplicationRoleAdminService(GroupManager groupManager, ApplicationRoleManager applicationRoleManager, JiraAuthenticationContext ctx, GlobalPermissionManager permissionManager) -
Method Summary
Modifier and TypeMethodDescriptiongetRole(com.atlassian.application.api.ApplicationKey key) Return theApplicationRolebacked by a (potentially exceeded) license.getRoles()Returns an immutableSetof allApplicationRoles that are backed by a (potentially exceeded) license.setRole(ApplicationRole role) Save the passedApplicationRoleinformation to the database.setRoles(Collection<ApplicationRole> roles) Save the passed list ofApplicationRoleinformation to the database.
-
Constructor Details
-
DefaultApplicationRoleAdminService
public DefaultApplicationRoleAdminService(@Nonnull GroupManager groupManager, @Nonnull ApplicationRoleManager applicationRoleManager, @Nonnull JiraAuthenticationContext ctx, @Nonnull GlobalPermissionManager permissionManager)
-
-
Method Details
-
getRoles
Description copied from interface:ApplicationRoleAdminServiceReturns an immutableSetof allApplicationRoles that are backed by a (potentially exceeded) license.- Specified by:
getRolesin interfaceApplicationRoleAdminService- Returns:
- the
Setof allApplicationRoles that are backed by a (potentially exceeded) license or an error.
-
getRole
@Nonnull public ServiceOutcome<ApplicationRole> getRole(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleAdminServiceReturn theApplicationRolebacked by a (potentially exceeded) license.- Specified by:
getRolein interfaceApplicationRoleAdminService- Parameters:
key- the key that identifies theApplicationRole.- Returns:
- the
ApplicationRolethat is backed by a (potentially exceeded) license or an error if not possible.
-
setRole
Description copied from interface:ApplicationRoleAdminServiceSave the passedApplicationRoleinformation to the database. This method will only accept the passed role if:- The role is backed by a (potentially exceeded) license.
- The role only contains currently valid groups.
- The default groups are contained within the role.
- Specified by:
setRolein interfaceApplicationRoleAdminService- Parameters:
role- the role to save.- Returns:
- the role as persisted to the database or an error.
-
setRoles
@Nonnull public ServiceOutcome<Set<ApplicationRole>> setRoles(@Nonnull Collection<ApplicationRole> roles) Description copied from interface:ApplicationRoleAdminServiceSave the passed list ofApplicationRoleinformation to the database. This method will only accept the passed role if:- Each role is backed by a (potentially exceeded) license.
- Each roles only contains currently valid groups.
- The default groups are contained within each role
- Specified by:
setRolesin interfaceApplicationRoleAdminService- Parameters:
roles- the roles to save- Returns:
- the roles as persisted to the database or an error
-