com.atlassian.jira.license
Interface LicenseRoleManager

All Known Implementing Classes:
DefaultLicenseRoleManager

@ExperimentalApi
public interface LicenseRoleManager

Provides read and write capabilities regarding LicenseRoles. Unless otherwise stated, the methods on this class only deal with authenticated LicenseRoles. An authenticated LicenseRole is defined by a plugin AND is licensed. A LicenseRole is licensed when there is a license in JIRA that indicates the role is licensed.

Since:
6.3

Method Summary
 Set<String> getGroupsForAuthenticatedLicenseRoles()
          Get groups that has been associated with all authenticated license roles.
 com.atlassian.fugue.Option<LicenseRole> getLicenseRole(LicenseRoleId licenseRoleId)
          Return the authenticated LicenseRole associated with the passed ID or Option.none() if no such role exists.
 Set<LicenseRole> getLicenseRoles()
          Returns the Set of all currently authenticated LicenseRoles.
 boolean isAuthenticated(LicenseRoleId licenseRoleId)
          Return true when the passed LicenseRoleId is authenticated.
 LicenseRole setLicenseRole(LicenseRole role)
          Save the passed LicenseRole information to the database.
 

Method Detail

getLicenseRole

@Nonnull
com.atlassian.fugue.Option<LicenseRole> getLicenseRole(@Nonnull
                                                               LicenseRoleId licenseRoleId)
Return the authenticated LicenseRole associated with the passed ID or Option.none() if no such role exists. An authenticated LicenseRole is both defined and licensed.

Parameters:
licenseRoleId - the ID to search for.
Returns:
the LicenseRole associated with the passed ID.
Since:
7.0

getLicenseRoles

@Nonnull
Set<LicenseRole> getLicenseRoles()
Returns the Set of all currently authenticated LicenseRoles. An authenticated LicenseRole is both defined and licensed.

Returns:
the Set of authenticated LicenseRoles.
Since:
7.0

getGroupsForAuthenticatedLicenseRoles

@Nonnull
Set<String> getGroupsForAuthenticatedLicenseRoles()
Get groups that has been associated with all authenticated license roles.

Returns:
groups that has been associated with all authenticated license roles
Since:
7.0

isAuthenticated

boolean isAuthenticated(@Nonnull
                        LicenseRoleId licenseRoleId)
Return true when the passed LicenseRoleId is authenticated. A LicenseRoleId is authenticated when a plugin provides a LicenseRoleDefinition and it is also licensed.

Parameters:
licenseRoleId - the ID to check.
Returns:
true when the passed LicenseRoleId is authenticated.

setLicenseRole

@Nonnull
LicenseRole setLicenseRole(@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.
Throws:
IllegalArgumentException - if passed role does not contain valid groups, if the primary group is invalid or if the role is not authenticated.
Since:
7.0


Copyright © 2002-2014 Atlassian. All Rights Reserved.