Interface ApplicationRoleAdminService

All Known Implementing Classes:
DefaultApplicationRoleAdminService, MockApplicationRoleAdminService

public interface ApplicationRoleAdminService
Provides access to ApplicationRole management functionality.
Since:
7.0
  • Field Details

    • ERROR_GROUPS

      static final String ERROR_GROUPS
      The key for any group related errors reported.
      See Also:
    • ERROR_DEFAULT_GROUPS

      static final String ERROR_DEFAULT_GROUPS
      The key for any defaultGroup related errors reported.
      See Also:
  • Method Details

    • getRoles

      @Nonnull ServiceOutcome<Set<ApplicationRole>> getRoles()
      Returns an immutable Set of all ApplicationRoles that are backed by a (potentially exceeded) license.
      Returns:
      the Set of all ApplicationRoles that are backed by a (potentially exceeded) license or an error.
    • setRoles

      Save the passed list of ApplicationRole information to the database. This method will only accept the passed role if:
      1. Each role is backed by a (potentially exceeded) license.
      2. Each roles only contains currently valid groups.
      3. 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 the ApplicationRole backed by a (potentially exceeded) license.
      Parameters:
      key - the key that identifies the ApplicationRole.
      Returns:
      the ApplicationRole that is backed by a (potentially exceeded) license or an error if not possible.
    • setRole

      @Nonnull ServiceOutcome<ApplicationRole> setRole(@Nonnull ApplicationRole role)
      Save the passed ApplicationRole information to the database. This method will only accept the passed role if:
      1. The role is backed by a (potentially exceeded) license.
      2. The role only contains currently valid groups.
      3. 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.