Class DefaultApplicationRoleManager
- All Implemented Interfaces:
com.atlassian.application.host.ApplicationConfigurationManager,ApplicationRoleManager,CachingComponent,InitializingComponent,LicenseCountService
ApplicationRoleManager.- Since:
- 6.3
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultApplicationRoleManager(com.atlassian.cache.CacheManager cacheManager, ApplicationRoleStore store, ApplicationRoleDefinitions definitions, GroupManager groupManager, JiraLicenseManager licenseManager, RecoveryMode recoveryMode, com.atlassian.crowd.embedded.api.CrowdService crowdService, com.atlassian.event.api.EventPublisher eventPublisher, InternalMembershipDao internalMembershipDao, JiraEncryptingDirectoryDAO directoryDao, ExtendedUserDao ofBizUserDao, OfBizTransactionManager ofBizTransactionManager, com.atlassian.crowd.manager.directory.SynchronisationStatusManager crowdSyncStatusManager, FeatureManager featureManager, com.atlassian.crowd.directory.loader.DirectoryInstanceLoader directoryInstanceLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after all the beans are constructed and the ApplicationContext is fully populated.voidClear the cache within the component.voidclearConfiguration(com.atlassian.application.api.ApplicationKey key) voidflush()Clear the billable users cache.voidClear the cache for billable users.Set<com.atlassian.application.api.ApplicationKey> Returns an immutableSetofApplicationKeys that are configured as the default applications for new users.Set<com.atlassian.crowd.embedded.api.Group> getDefaultGroups(com.atlassian.application.api.ApplicationKey key) Get the defaultGroups associated with theApplicationRolebacked by a (potentially exceeded) license.Set<com.atlassian.crowd.embedded.api.Group> Get theSetof group names that have been associated with all theApplicationRoles that have a backing (but potentially exceeded) license.intgetRemainingSeats(com.atlassian.application.api.ApplicationKey key) Retrieve the number of available (unoccupied) user seats for theApplicationRolebacked by a (potentially exceeded) license.intgetRemainingSeatsAsync(com.atlassian.application.api.ApplicationKey key) Async version ofApplicationRoleManager.getRemainingSeats(ApplicationKey).io.atlassian.fugue.Option<ApplicationRole> getRole(com.atlassian.application.api.ApplicationKey role) Returns theApplicationRoleidentified by the givenApplicationKey, orOption.none()if no suchApplicationRoleexists.getRoles()Returns an immutableSetof allApplicationRoles that are backed by a (potentially exceeded) license.getRolesForGroup(com.atlassian.crowd.embedded.api.Group group) Returns theSetofApplicationRoles associated with the givenGroup, or groups for which the given group is a nested group (sub-group).intgetUserCount(com.atlassian.application.api.ApplicationKey key) Retrieve the number of active users for the givenApplicationRole.intgetUserCountAsync(com.atlassian.application.api.ApplicationKey key) Async version ofApplicationRoleManager.getUserCount(ApplicationKey).booleanhasAnyRole(ApplicationUser user) Returns true if the given user has been assigned to anyApplicationRolethat is backed by a (potentially exceeded) license.booleanReturns true if the user limits of all of the given user's assignedApplicationRoles have been exceeded.booleanAsync version ofApplicationRoleManager.hasExceededAllRoles(ApplicationUser).booleanhasSeatsAvailable(com.atlassian.application.api.ApplicationKey key, int seatCount) Determines whether theApplicationRolebacked by a license has the requested number of user seats available.booleanhasSeatsAvailableAsync(com.atlassian.application.api.ApplicationKey key, int seatCount) Async version ofApplicationRoleManager.hasSeatsAvailable(ApplicationKey, int).booleanReturns true if the number of users assigned to anyApplicationRoleexceeds the number of seats granted to that role by its license.booleanAsync version ofApplicationRoleManager.isAnyRoleLimitExceeded().booleanisRoleInstalledAndLicensed(com.atlassian.application.api.ApplicationKey key) Determines whether an application identified by the givenApplicationKeyis installed and running in this JIRA instance AND has a backing license key.booleanisRoleLimitExceeded(com.atlassian.application.api.ApplicationKey applicationKey) Returnstrueif the number of users assigned to the givenApplicationRoleexceeds the number of seats granted by its license.booleanisRoleLimitExceededAsync(com.atlassian.application.api.ApplicationKey applicationKey) Async version ofApplicationRoleManager.isRoleLimitExceeded(ApplicationKey).voidonApplicationDefined(com.atlassian.application.host.events.ApplicationDefinedEvent event) voidonApplicationUndefined(com.atlassian.application.host.events.ApplicationUndefinedEvent event) voidonClearCache(ClearCacheEvent event) voidonComponentManagerShutdown(ComponentManagerShutdownEvent shutdownEvent) voidonDirectoryReorder(com.atlassian.crowd.event.application.ApplicationDirectoryOrderUpdatedEvent event) voidonDirectoryUpdated(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent event) voidonGroupCreated(com.atlassian.crowd.event.group.GroupCreatedEvent createdEvent) voidonGroupDeleted(com.atlassian.crowd.event.group.GroupDeletedEvent deletedEvent) voidonGroupMembershipDeleted(com.atlassian.crowd.event.group.GroupMembershipDeletedEvent e) voidonGroupMembershipsCreated(com.atlassian.crowd.event.group.GroupMembershipsCreatedEvent e) voidonGroupUpdated(com.atlassian.crowd.event.group.GroupUpdatedEvent updatedEvent) voidvoidonSyncFinished(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisationFinishedEvent e) voidonUserDeleted(com.atlassian.crowd.event.user.UserDeletedEvent e) voidonUserUpdated(com.atlassian.crowd.event.user.AutoUserUpdatedEvent event) voidonUserUpdated(com.atlassian.crowd.event.user.UserEditedEvent event) voidremoveGroupFromRoles(com.atlassian.crowd.embedded.api.Group group) Removes any/all associations of the given group from allApplicationRoles (irrespective of whether theApplicationRoles is backed by a license).setRole(ApplicationRole role) Save the passedApplicationRoleinformation to the database.intGets the number of active users who currently count towards the license and should be charged for.booleanuserHasRole(ApplicationUser user, com.atlassian.application.api.ApplicationKey key) Returnstrueif the passed user belongs to theApplicationRoleassociated with the given key.booleanuserOccupiesRole(ApplicationUser user, com.atlassian.application.api.ApplicationKey key) Returnstrueif the passed user occupies a seat in theApplicationRoleassociated with the given key.protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.application.ApplicationRoleManager
rolesEnabled
-
Constructor Details
-
DefaultApplicationRoleManager
public DefaultApplicationRoleManager(@Nonnull com.atlassian.cache.CacheManager cacheManager, @Nonnull ApplicationRoleStore store, @Nonnull ApplicationRoleDefinitions definitions, @Nonnull GroupManager groupManager, @Nonnull JiraLicenseManager licenseManager, @Nonnull RecoveryMode recoveryMode, @Nonnull com.atlassian.crowd.embedded.api.CrowdService crowdService, @Nonnull com.atlassian.event.api.EventPublisher eventPublisher, @Nonnull InternalMembershipDao internalMembershipDao, @Nonnull JiraEncryptingDirectoryDAO directoryDao, @Nonnull ExtendedUserDao ofBizUserDao, @Nonnull OfBizTransactionManager ofBizTransactionManager, @Nonnull com.atlassian.crowd.manager.directory.SynchronisationStatusManager crowdSyncStatusManager, @Nonnull FeatureManager featureManager, @Nonnull com.atlassian.crowd.directory.loader.DirectoryInstanceLoader directoryInstanceLoader)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
waitForActiveUsersCacheLoader
protected void waitForActiveUsersCacheLoader() -
getRole
@Nonnull public io.atlassian.fugue.Option<ApplicationRole> getRole(@Nonnull com.atlassian.application.api.ApplicationKey role) Description copied from interface:ApplicationRoleManagerReturns theApplicationRoleidentified by the givenApplicationKey, orOption.none()if no suchApplicationRoleexists.Note:
ApplicationRoles returned by this method are guaranteed to be backed by a (potentially exceeded) license, however the installation state of the plugin/product that uses this role may not necessarily physically installed.- Specified by:
getRolein interfaceApplicationRoleManager- Parameters:
role- theApplicationKeyof the role to search for.- Returns:
- the
ApplicationRoleassociated with the passed role identifier, orOption.none().
-
getRoles
Description copied from interface:ApplicationRoleManagerReturns an immutableSetof allApplicationRoles that are backed by a (potentially exceeded) license.- Specified by:
getRolesin interfaceApplicationRoleManager- Returns:
- the
Setof allApplicationRoles that are backed by a (potentially exceeded) license.
-
getDefaultApplicationKeys
Description copied from interface:ApplicationRoleManagerReturns an immutableSetofApplicationKeys that are configured as the default applications for new users.- Specified by:
getDefaultApplicationKeysin interfaceApplicationRoleManager- Returns:
- the
SetofApplicationKeys that are configured as the default applications for new users.
-
hasAnyRole
Description copied from interface:ApplicationRoleManagerReturns true if the given user has been assigned to anyApplicationRolethat is backed by a (potentially exceeded) license.- Specified by:
hasAnyRolein interfaceApplicationRoleManager- Returns:
- true if the given user has been assigned to any
ApplicationRolethat is backed by a (potentially exceeded) license.
-
userHasRole
public boolean userHasRole(@Nullable ApplicationUser user, com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerReturnstrueif the passed user belongs to theApplicationRoleassociated with the given key. NOTE: This does not check that the application is licensed with a valid license.- Specified by:
userHasRolein interfaceApplicationRoleManager- Parameters:
user- the user to check - if this is null, returnsfalsekey- the key corresponding to theApplicationRole- Returns:
- true if the user belongs to a group of the given application
-
userOccupiesRole
public boolean userOccupiesRole(@Nullable ApplicationUser user, com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerReturnstrueif the passed user occupies a seat in theApplicationRoleassociated with the given key.- Specified by:
userOccupiesRolein interfaceApplicationRoleManager- Parameters:
user- the user to check - if this is null, returnsfalsekey- the key corresponding to theApplicationRole- Returns:
- true if the user occupies seat in the given application
-
isAnyRoleLimitExceeded
public boolean isAnyRoleLimitExceeded()Description copied from interface:ApplicationRoleManagerReturns true if the number of users assigned to anyApplicationRoleexceeds the number of seats granted to that role by its license.The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to use
ApplicationRoleManager.isAnyRoleLimitExceededAsync()async version of the method} Note: this method does NOT take into account whether licenses for installed roles areexpired; this must be tested separately.- Specified by:
isAnyRoleLimitExceededin interfaceApplicationRoleManager- Returns:
- true if the number of users for any role is greater than the number of seats granted to that role by its license.
-
isAnyRoleLimitExceededAsync
public boolean isAnyRoleLimitExceededAsync()Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.isAnyRoleLimitExceeded(). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Returns true if the number of users assigned to anyApplicationRoleexceeds the number of seats granted to that role by its license.Note: this method does NOT take into account whether licenses for installed roles are
expired; this must be tested separately.- Specified by:
isAnyRoleLimitExceededAsyncin interfaceApplicationRoleManager- Returns:
- true if the number of users for any role is greater than the number of seats granted to that role by its license.
-
isRoleLimitExceeded
public boolean isRoleLimitExceeded(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey) Description copied from interface:ApplicationRoleManagerReturnstrueif the number of users assigned to the givenApplicationRoleexceeds the number of seats granted by its license. This method unconditionally returnsfalseif the passed role is not considered to be installed (ie: backed by a license).Note: this method does NOT take into account whether licenses for installed roles are
The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to useexpired; this must be tested separately.async version of the method- Specified by:
isRoleLimitExceededin interfaceApplicationRoleManager- Parameters:
applicationKey- the identifier of theApplicationRole.- Returns:
trueif the installedApplicationRoleis exceeded orfalseotherwise.
-
isRoleLimitExceededAsync
public boolean isRoleLimitExceededAsync(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey) Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.isRoleLimitExceeded(ApplicationKey). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Returnstrueif the number of users assigned to the givenApplicationRoleexceeds the number of seats granted by its license. This method unconditionally returnsfalseif the passed role is not considered to be installed (ie: backed by a license).Note: this method does NOT take into account whether licenses for installed roles are
expired; this must be tested separately.- Specified by:
isRoleLimitExceededAsyncin interfaceApplicationRoleManager- Parameters:
applicationKey- the identifier of theApplicationRole.- Returns:
trueif the installedApplicationRoleis exceeded orfalseotherwise.
-
hasExceededAllRoles
Description copied from interface:ApplicationRoleManagerReturns true if the user limits of all of the given user's assignedApplicationRoles have been exceeded. The user limit of anApplicationRoleis exceeded when the combined number of users assigned to that role (through assigned groups) exceeds the number of seats granted for that role in its license.Note: this method does NOT take into account whether licenses for application roles are
The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to useexpired; this must be tested separately.ApplicationRoleManager.hasExceededAllRolesAsync(ApplicationUser)async version of the method}- Specified by:
hasExceededAllRolesin interfaceApplicationRoleManager- Parameters:
user- the user whose roles will be checked.- Returns:
trueif all of theuser's roles have user counts that exceed the number of seats granted by licenses.
-
hasExceededAllRolesAsync
Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.hasExceededAllRoles(ApplicationUser). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Returns true if the user limits of all of the given user's assignedApplicationRoles have been exceeded. The user limit of anApplicationRoleis exceeded when the combined number of users assigned to that role (through assigned groups) exceeds the number of seats granted for that role in its license.Note: this method does NOT take into account whether licenses for application roles are
expired; this must be tested separately.- Specified by:
hasExceededAllRolesAsyncin interfaceApplicationRoleManager- Parameters:
user- the user whose roles will be checked.- Returns:
trueif all of theuser's roles have user counts that exceed the number of seats granted by licenses.
-
getRolesForUser
Description copied from interface:ApplicationRoleManager- Specified by:
getRolesForUserin interfaceApplicationRoleManager- Parameters:
user- the user whose roles will be checked.- Returns:
- the
SetofApplicationRoles for the givenuser.
-
getOccupiedLicenseRolesForUser
Description copied from interface:ApplicationRoleManagerReturns theSetofApplicationRoles that the givenApplicationUseroccupies seats in.ApplicationUserhas to actively take a seat in the returnedApplicationRoles eg. for anApplicationUserwho has access to SOFTWARE and implicitly (or explicitly) CORE, they will only have SOFTWARE returned. For anApplicationUserwho has explicit access to SOFTWARE and CORE - with the SOFTWARE license exceeded, this will return both as the user effectively occupies a seat in both CORE and SOFTWARE now.- Specified by:
getOccupiedLicenseRolesForUserin interfaceApplicationRoleManager- Parameters:
user- the user whose roles will be checked.- Returns:
- the
SetofApplicationRoles that the givenuseris actively taking seats.
-
getRolesForGroup
Description copied from interface:ApplicationRoleManagerReturns theSetofApplicationRoles associated with the givenGroup, or groups for which the given group is a nested group (sub-group).- Specified by:
getRolesForGroupin interfaceApplicationRoleManager- Parameters:
group- the group which roles will be checked.- Returns:
- the
SetofApplicationRoles associated with the group or its super-groups.
-
getGroupsForLicensedRoles
Description copied from interface:ApplicationRoleManagerGet theSetof group names that have been associated with all theApplicationRoles that have a backing (but potentially exceeded) license.- Specified by:
getGroupsForLicensedRolesin interfaceApplicationRoleManager- Returns:
- Groups associated with all the
ApplicationRoles that have a backing (but potentially exceeded) license.
-
removeGroupFromRoles
public void removeGroupFromRoles(@Nonnull com.atlassian.crowd.embedded.api.Group group) Description copied from interface:ApplicationRoleManagerRemoves any/all associations of the given group from allApplicationRoles (irrespective of whether theApplicationRoles is backed by a license).- Specified by:
removeGroupFromRolesin interfaceApplicationRoleManager- Parameters:
group- the group to remove.
-
isRoleInstalledAndLicensed
public boolean isRoleInstalledAndLicensed(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerDetermines whether an application identified by the given
ApplicationKeyis installed and running in this JIRA instance AND has a backing license key.- Specified by:
isRoleInstalledAndLicensedin interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRolebacked by a (potentially exceeded) license.- Returns:
truewhen theApplicationRolebacked by a (potentially exceeded) license has an associated application installed and running in this JIRA instance.
-
setRole
Description copied from interface:ApplicationRoleManagerSave the passedApplicationRoleinformation to the database. This method will only accept the passed role if:- The role is backed by a (potentially exceeded) license.
- The role only contains currently valid groups.
- The default group are not a subset of the groups in the role.
- Specified by:
setRolein interfaceApplicationRoleManager- Parameters:
role- the role to save.- Returns:
- the role as persisted to the database.
-
clearConfiguration
public void clearConfiguration(com.atlassian.application.api.ApplicationKey key) - Specified by:
clearConfigurationin interfacecom.atlassian.application.host.ApplicationConfigurationManager
-
getUserCount
public int getUserCount(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerRetrieve the number of active users for the givenApplicationRole. It will uniquely count all users who are found in the groups associated with the application. The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to useApplicationRoleManager.getUserCountAsync(ApplicationKey)async version of the method}- Specified by:
getUserCountin interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRole.- Returns:
- the number of active users for the given
ApplicationRole, or zero if theApplicationRoledoes not exist.
-
getUserCountAsync
public int getUserCountAsync(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.getUserCount(ApplicationKey). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Retrieve the number of active users for the givenApplicationRole. It will uniquely count all users who are found in the groups associated with the application.- Specified by:
getUserCountAsyncin interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRole.- Returns:
- the number of active users for the given
ApplicationRole, or zero if theApplicationRoledoes not exist.
-
getRemainingSeats
public int getRemainingSeats(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerRetrieve the number of available (unoccupied) user seats for theApplicationRolebacked by a (potentially exceeded) license. The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to useApplicationRoleManager.getRemainingSeatsAsync(ApplicationKey)async version of the method}- Specified by:
getRemainingSeatsin interfaceApplicationRoleManager- Parameters:
key- the key that identifies the licensedApplicationRole.- Returns:
- the number of remaining users seats. Will return zero when there are more users than seats licensed, the
ApplicationRoleis not valid or there are as many active users as seats in the license. When the license is unlimited, it will return minus one (-1) - See Also:
-
getRemainingSeatsAsync
public int getRemainingSeatsAsync(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.getRemainingSeats(ApplicationKey). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Retrieve the number of available (unoccupied) user seats for theApplicationRolebacked by a (potentially exceeded) license.- Specified by:
getRemainingSeatsAsyncin interfaceApplicationRoleManager- Parameters:
key- the key that identifies the licensedApplicationRole.- Returns:
- the number of remaining users seats. Will return zero when there are more users than seats licensed, the
ApplicationRoleis not valid or there are as many active users as seats in the license. When the license is unlimited, it will return minus one (-1) - See Also:
-
hasSeatsAvailable
public boolean hasSeatsAvailable(@Nonnull com.atlassian.application.api.ApplicationKey key, int seatCount) Description copied from interface:ApplicationRoleManagerDetermines whether theApplicationRolebacked by a license has the requested number of user seats available. The method is known to be slow in some circumstances, and to block Jira instance. It's strongly recommended to useApplicationRoleManager.hasSeatsAvailableAsync(ApplicationKey, int)async version of the method}- Specified by:
hasSeatsAvailablein interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRole.seatCount- the number of user seats that thisApplicationRoleshould have capacity for.- Returns:
trueif theApplicationRolefor the providedApplicationKeyhas the number of user seats available.falseif the there are not enough seats available.
-
hasSeatsAvailableAsync
public boolean hasSeatsAvailableAsync(@Nonnull com.atlassian.application.api.ApplicationKey key, int seatCount) Description copied from interface:ApplicationRoleManagerAsync version ofApplicationRoleManager.hasSeatsAvailable(ApplicationKey, int). The method returns the last know value without waiting for the current changes to be propagated. This implementation is safer and offers a better performance. Determines whether theApplicationRolebacked by a license has the requested number of user seats available.- Specified by:
hasSeatsAvailableAsyncin interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRole.seatCount- the number of user seats that thisApplicationRoleshould have capacity for.- Returns:
trueif theApplicationRolefor the providedApplicationKeyhas the number of user seats available.falseif the there are not enough seats available.
-
getDefaultGroups
@Nonnull public Set<com.atlassian.crowd.embedded.api.Group> getDefaultGroups(@Nonnull com.atlassian.application.api.ApplicationKey key) Description copied from interface:ApplicationRoleManagerGet the defaultGroups associated with theApplicationRolebacked by a (potentially exceeded) license.- Specified by:
getDefaultGroupsin interfaceApplicationRoleManager- Parameters:
key- the key that identifies theApplicationRole.- Returns:
- the
Setof default groups associated with theApplicationRole.
-
onClearCache
-
onApplicationDefined
@EventListener public void onApplicationDefined(com.atlassian.application.host.events.ApplicationDefinedEvent event) -
onApplicationUndefined
@EventListener public void onApplicationUndefined(com.atlassian.application.host.events.ApplicationUndefinedEvent event) -
onLicenseChanged
-
onGroupCreated
@EventListener public void onGroupCreated(com.atlassian.crowd.event.group.GroupCreatedEvent createdEvent) -
onGroupDeleted
@EventListener public void onGroupDeleted(com.atlassian.crowd.event.group.GroupDeletedEvent deletedEvent) -
onGroupUpdated
@EventListener public void onGroupUpdated(com.atlassian.crowd.event.group.GroupUpdatedEvent updatedEvent) -
onDirectoryReorder
@EventListener public void onDirectoryReorder(com.atlassian.crowd.event.application.ApplicationDirectoryOrderUpdatedEvent event) -
onDirectoryUpdated
@EventListener public void onDirectoryUpdated(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent event) -
onGroupMembershipsCreated
@EventListener public void onGroupMembershipsCreated(com.atlassian.crowd.event.group.GroupMembershipsCreatedEvent e) -
onGroupMembershipDeleted
@EventListener public void onGroupMembershipDeleted(com.atlassian.crowd.event.group.GroupMembershipDeletedEvent e) -
onUserDeleted
@EventListener public void onUserDeleted(com.atlassian.crowd.event.user.UserDeletedEvent e) -
onUserUpdated
@EventListener public void onUserUpdated(com.atlassian.crowd.event.user.UserEditedEvent event) -
onUserUpdated
@EventListener public void onUserUpdated(com.atlassian.crowd.event.user.AutoUserUpdatedEvent event) -
onSyncFinished
@EventListener public void onSyncFinished(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisationFinishedEvent e) -
onComponentManagerShutdown
-
clearCache
@Internal public void clearCache()Description copied from interface:CachingComponentClear the cache within the component.- Specified by:
clearCachein interfaceCachingComponent
-
totalBillableUsers
public int totalBillableUsers()Description copied from interface:LicenseCountServiceGets the number of active users who currently count towards the license and should be charged for. This method should be used when determining user counts for billing purposes, such as purchase tier recommendations for plugins, and by plugins who wish to enforce tier-based licenses.Implementations of this method should take performance into consideration, and ensure that the value is cached. Use
LicenseCountService.flush()to clear the cache.- Specified by:
totalBillableUsersin interfaceLicenseCountService- Returns:
- the number of users in JIRA which currently count against at least one license
- See Also:
-
flush
public void flush()Description copied from interface:LicenseCountServiceClear the billable users cache. Note, despite the general name this clears only the billable users cache. Usually it is not necessary to call this method as implementors are expected to clear cached state in response to appropriate events.- Specified by:
flushin interfaceLicenseCountService
-
flushBillableUsersCache
public void flushBillableUsersCache()Description copied from interface:LicenseCountServiceClear the cache for billable users. Usually it is not necessary to call this method as implementors are expected to clear cached state in response to appropriate events.- Specified by:
flushBillableUsersCachein interfaceLicenseCountService
-