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 LicenseRoles. |
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)
LicenseRoleManagerLicenseRole 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 LicenseRoleManagerlicenseRoleId - the ID to search for.LicenseRole associated with the passed ID.@Nonnull public Set<LicenseRole> getLicenseRoles()
LicenseRoleManagerSet of all currently installed LicenseRoles.
An installed LicenseRole has been defined by a plugin/product
AND has an accompanying license that grants that role.getLicenseRoles in interface LicenseRoleManagerSet of installed LicenseRoles.@Nonnull public Set<String> getGroupsForInstalledLicenseRoles()
getGroupsForInstalledLicenseRoles in interface LicenseRoleManagerLicenseRoleAdminServicepublic void removeGroupFromLicenseRoles(@Nonnull String groupName)
LicenseRoleManagerremoveGroupFromLicenseRoles in interface LicenseRoleManagergroupName - the name of the group to remove.public boolean isLicenseRoleInstalled(@Nonnull LicenseRoleId licenseRoleId)
LicenseRoleManagertrue 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 LicenseRoleManagerlicenseRoleId - the ID to check.true when the passed LicenseRoleId is installed.@Nonnull public LicenseRole setLicenseRole(@Nonnull LicenseRole role)
LicenseRoleManagerLicenseRole information to the database.
This method will only accept the passed role if:
setLicenseRole in interface LicenseRoleManagerrole - the role to save.public int getUserCount(@Nonnull LicenseRoleId roleId)
LicenseRoleManagergetUserCount in interface LicenseRoleManagerroleId - 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.