public final class DefaultLicenseRoleManager extends Object implements LicenseRoleManager
LicenseRoleManager
.Constructor and Description |
---|
DefaultLicenseRoleManager(com.atlassian.cache.CacheManager cacheManager,
LicenseRoleStore store,
LicenseRoleDefinitions definitions,
GroupManager groupManager) |
Modifier and Type | Method and Description |
---|---|
void |
clearCache(ClearCacheEvent event) |
Set<String> |
getGroupsForInstalledLicenseRoles()
Get groups that has been associated with all authenticated license roles
|
com.atlassian.fugue.Option<LicenseRole> |
getLicenseRole(LicenseRoleId licenseRoleId)
Return the installed
LicenseRole associated with the passed ID or
Option.none() if no such role exists. |
Set<LicenseRole> |
getLicenseRoles()
Returns the
Set of all currently installed LicenseRole s. |
int |
getUserCount(LicenseRoleId roleId)
Retrieve the number of active users for a specific license role (product).
|
boolean |
isLicenseRoleInstalled(LicenseRoleId licenseRoleId)
Return
true when the passed LicenseRoleId is installed. |
void |
onDirectoryModified(com.atlassian.crowd.event.DirectoryEvent event) |
void |
onDirectorySynchronisation(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisedEvent event) |
void |
onFeatureChange(FeatureEvent event) |
void |
onGroupCreated(com.atlassian.crowd.event.group.GroupCreatedEvent createdEvent) |
void |
onGroupDeleted(com.atlassian.crowd.event.group.GroupDeletedEvent deletedEvent) |
void |
onLicenseChanged(NewLicenseEvent event) |
void |
onLicenseRoleDefined(LicenseRoleDefinedEvent event) |
void |
onLicenseRoleUndefined(LicenseRoleUndefinedEvent event) |
void |
removeGroupFromLicenseRoles(String groupName)
Removes any/all associations of the given group from all license roles.
|
LicenseRole |
setLicenseRole(LicenseRole role)
Save the passed
LicenseRole information to the database. |
public DefaultLicenseRoleManager(@Nonnull com.atlassian.cache.CacheManager cacheManager, @Nonnull LicenseRoleStore store, @Nonnull LicenseRoleDefinitions definitions, @Nonnull GroupManager groupManager)
@Nonnull public com.atlassian.fugue.Option<LicenseRole> getLicenseRole(@Nonnull LicenseRoleId licenseRoleId)
LicenseRoleManager
LicenseRole
associated with the passed ID or
Option.none()
if no such role exists.
An installed LicenseRole
has been defined by a plugin/product
AND has an accompanying license that grants that role.getLicenseRole
in interface LicenseRoleManager
licenseRoleId
- the ID to search for.LicenseRole
associated with the passed ID.@Nonnull public Set<LicenseRole> getLicenseRoles()
LicenseRoleManager
Set
of all currently installed LicenseRole
s.
An installed LicenseRole
has been defined by a plugin/product
AND has an accompanying license that grants that role.getLicenseRoles
in interface LicenseRoleManager
Set
of installed LicenseRole
s.@Nonnull public Set<String> getGroupsForInstalledLicenseRoles()
getGroupsForInstalledLicenseRoles
in interface LicenseRoleManager
LicenseRoleAdminService
public void removeGroupFromLicenseRoles(@Nonnull String groupName)
LicenseRoleManager
removeGroupFromLicenseRoles
in interface LicenseRoleManager
groupName
- the name of the group to remove.public boolean isLicenseRoleInstalled(@Nonnull LicenseRoleId licenseRoleId)
LicenseRoleManager
true
when the passed LicenseRoleId
is installed.
An installed LicenseRole
has been defined by a plugin/product
AND has an accompanying license that grants that role.isLicenseRoleInstalled
in interface LicenseRoleManager
licenseRoleId
- the ID to check.true
when the passed LicenseRoleId
is installed.@Nonnull public LicenseRole setLicenseRole(@Nonnull LicenseRole role)
LicenseRoleManager
LicenseRole
information to the database.
This method will only accept the passed role if:
setLicenseRole
in interface LicenseRoleManager
role
- the role to save.public int getUserCount(@Nonnull LicenseRoleId roleId)
LicenseRoleManager
getUserCount
in interface LicenseRoleManager
roleId
- is the license role ID used to identify the product.@EventListener public void clearCache(ClearCacheEvent event)
@EventListener public void onLicenseRoleDefined(LicenseRoleDefinedEvent event)
@EventListener public void onLicenseRoleUndefined(LicenseRoleUndefinedEvent event)
@EventListener public void onLicenseChanged(NewLicenseEvent event)
@EventListener public void onFeatureChange(FeatureEvent event)
@EventListener public void onGroupDeleted(com.atlassian.crowd.event.group.GroupDeletedEvent deletedEvent)
@EventListener public void onGroupCreated(com.atlassian.crowd.event.group.GroupCreatedEvent createdEvent)
@EventListener public void onDirectoryModified(com.atlassian.crowd.event.DirectoryEvent event)
@EventListener public void onDirectorySynchronisation(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisedEvent event)
Copyright © 2002-2015 Atlassian. All Rights Reserved.