Package com.atlassian.jira.application
Interface ApplicationRoleAdminService
- All Known Implementing Classes:
DefaultApplicationRoleAdminService,MockApplicationRoleAdminService
public interface ApplicationRoleAdminService
Provides access to
ApplicationRole management functionality.- Since:
- 7.0
-
Field Summary
Fields -
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.
-
Field Details
-
ERROR_GROUPS
The key for any group related errors reported.- See Also:
-
ERROR_DEFAULT_GROUPS
The key for any defaultGroup related errors reported.- See Also:
-
-
Method Details
-
getRoles
Returns an immutableSetof allApplicationRoles that are backed by a (potentially exceeded) license.- Returns:
- the
Setof allApplicationRoles that are backed by a (potentially exceeded) license or an error.
-
setRoles
Save 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
- Parameters:
roles- the roles to save- Returns:
- the roles as persisted to the database or an error
-
getRole
@Nonnull ServiceOutcome<ApplicationRole> getRole(@Nonnull com.atlassian.application.api.ApplicationKey key) Return theApplicationRolebacked by a (potentially exceeded) license.- Parameters:
key- the key that identifies theApplicationRole.- Returns:
- the
ApplicationRolethat is backed by a (potentially exceeded) license or an error if not possible.
-
setRole
Save 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.
- Parameters:
role- the role to save.- Returns:
- the role as persisted to the database or an error.
-