public class

MockApplicationRoleAdminService

extends Object
implements ApplicationRoleAdminService
java.lang.Object
   ↳ com.atlassian.jira.application.MockApplicationRoleAdminService

Summary

Constants
String NOT_FOUND
[Expand]
Inherited Constants
From interface com.atlassian.jira.application.ApplicationRoleAdminService
Public Constructors
MockApplicationRoleAdminService()
Public Methods
MockApplicationRole addApplicationRole(String id)
@Nonnull ServiceOutcome<ApplicationRole> getRole(ApplicationKey key)
Return the ApplicationRole backed by a (potentially exceeded) license.
@Nonnull ServiceOutcome<Set<ApplicationRole>> getRoles()
Returns an immutable Set of all ApplicationRoles that are backed by a (potentially exceeded) license.
@Nonnull ServiceOutcome<ApplicationRole> setRole(ApplicationRole role)
Save the passed ApplicationRole information to the database.
@Nonnull ServiceOutcome<Set<ApplicationRole>> setRoles(Collection<ApplicationRole> rolesList)
Save the passed list of ApplicationRole information to the database.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.application.ApplicationRoleAdminService

Constants

public static final String NOT_FOUND

Constant Value: "Not Found"

Public Constructors

public MockApplicationRoleAdminService ()

Public Methods

public MockApplicationRole addApplicationRole (String id)

@Nonnull public ServiceOutcome<ApplicationRole> getRole (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.

@Nonnull public 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.

@Nonnull public ServiceOutcome<ApplicationRole> setRole (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.

@Nonnull public ServiceOutcome<Set<ApplicationRole>> setRoles (Collection<ApplicationRole> rolesList)

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
rolesList the roles to save
Returns
  • the roles as persisted to the database or an error