com.atlassian.jira.bc.license
Interface LicenseRoleAdminService

All Known Subinterfaces:
LicenseRoleService
All Known Implementing Classes:
DefaultLicenseRoleService, MockLicenseRoleService

public interface LicenseRoleAdminService

Provides access to license role management functionality.

Since:
7.0

Field Summary
static String ERROR_GROUPS
          The key for any group related errors reported.
static String ERROR_PRIMARY
          The key for any primaryGroup related errors reported.
 
Method Summary
 ServiceOutcome<LicenseRole> getRole(LicenseRoleId licenseRoleId)
          Return the LicenseRole identified by the passed LicenseRoleId.
 ServiceOutcome<Set<LicenseRole>> getRoles()
          Return the collection of all the roles defined in the system or an error.
 ServiceOutcome<LicenseRole> setGroups(LicenseRoleId licenseRoleId, Iterable<String> groups)
          Deprecated. Use setRole(com.atlassian.jira.license.LicenseRole) instead.
 ServiceOutcome<LicenseRole> setRole(LicenseRole role)
          Save the passed LicenseRole information to the database.
 

Field Detail

ERROR_GROUPS

static final String ERROR_GROUPS
The key for any group related errors reported.

See Also:
Constant Field Values

ERROR_PRIMARY

static final String ERROR_PRIMARY
The key for any primaryGroup related errors reported.

See Also:
Constant Field Values
Method Detail

getRoles

@Nonnull
ServiceOutcome<Set<LicenseRole>> getRoles()
Return the collection of all the roles defined in the system or an error.

Returns:
the collection of all the roles defined in the system or an error.

getRole

@Nonnull
ServiceOutcome<LicenseRole> getRole(@Nonnull
                                            LicenseRoleId licenseRoleId)
Return the LicenseRole identified by the passed LicenseRoleId.

Parameters:
licenseRoleId - the id of the role to find.
Returns:
the LicenseRole with the passed LicenseRoleId or an error if such a LicenseRole is not currently installed in JIRA.

setRole

@Nonnull
ServiceOutcome<LicenseRole> setRole(@Nonnull
                                            LicenseRole role)
Save the passed LicenseRole information to the database. This method will only accept the passed role if:
  1. The role is authorised.
  2. The role only contains currently valid groups.
  3. The primary group is contained within the role.

Parameters:
role - the role to save.
Returns:
the role as persisted to the database or an error.

setGroups

@Nonnull
@Deprecated
ServiceOutcome<LicenseRole> setGroups(@Nonnull
                                                         LicenseRoleId licenseRoleId,
                                                         @Nonnull
                                                         Iterable<String> groups)
Deprecated. Use setRole(com.atlassian.jira.license.LicenseRole) instead.

Set the groups associated with the passed LicenseRoleId. The primary group for the role will be unset.

Parameters:
licenseRoleId - the id of the license role to update.
groups - the groups to associated with the passed license role.
Returns:
the updated LicenseRole or an error.


Copyright © 2002-2014 Atlassian. All Rights Reserved.