java.lang.Object | |
↳ | com.atlassian.jira.application.DefaultApplicationRoleManager |
Default implementation of ApplicationRoleManager
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear the cache within the component.
| |||||||||||
Clear the billable users cache.
| |||||||||||
Clear the cache for billable users.
| |||||||||||
Returns an immutable
Set of ApplicationKeys that are configured as the default applications for new users. | |||||||||||
Get the default
Group s associated with the ApplicationRole
backed by a (potentially exceeded) license. | |||||||||||
Returns an immutable
Set of ApplicationRole s that are configured be default for new users. | |||||||||||
Get the
Set of group names that have been associated with all the ApplicationRole s
that have a backing (but potentially exceeded) license. | |||||||||||
Retrieve the number of available (unoccupied) user seats for the
ApplicationRole
backed by a (potentially exceeded) license. | |||||||||||
Returns the
ApplicationRole identified by the given com.atlassian.application.api.ApplicationKey,
or none() if no such ApplicationRole exists. | |||||||||||
Returns an immutable
Set of all ApplicationRole s that are backed by a (potentially exceeded)
license. | |||||||||||
Returns the
Set of ApplicationRole s associated with the given Group , or groups for
which the given group is a nested group (sub-group). | |||||||||||
Retrieve the number of active users for the given
ApplicationRole . | |||||||||||
Returns true if the given user has been assigned to any
ApplicationRole that is backed by a
(potentially exceeded) license. | |||||||||||
Returns true if the user limits of all of the given user's assigned
ApplicationRole s have been exceeded. | |||||||||||
Determines whether the
ApplicationRole backed by a license
has the requested number of user seats available. | |||||||||||
Returns true if the number of users assigned to any
ApplicationRole exceeds the number of seats granted
to that role by its license. | |||||||||||
Determines whether an application identified by the given ApplicationKey is installed and running in this JIRA instance AND has a backing license key. | |||||||||||
Returns
true if the number of users assigned to the given ApplicationRole exceeds the
number of seats granted by its license. | |||||||||||
Removes any/all associations of the given group from all
ApplicationRole s
(irrespective of whether the ApplicationRole s is backed by a license). | |||||||||||
Determines whether
ApplicationRole s are enabled. | |||||||||||
Save the passed
ApplicationRole information to the database. | |||||||||||
Gets the number of active users who currently count towards the license and should be charged for.
| |||||||||||
Returns
true if the passed user belongs to the ApplicationRole associated with the given key. | |||||||||||
Returns
true if the passed user occupies a seat in the ApplicationRole associated with the given key. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
Clear the cache within the component.
Clear 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.
Clear 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.
Get the default Group
s associated with the ApplicationRole
backed by a (potentially exceeded) license.
key | the key that identifies the ApplicationRole . |
---|
Set
of default groups associated with the ApplicationRole
.
Returns an immutable Set
of ApplicationRole
s that are configured be default for new users.
Set
of ApplicationRole
s that are configured be default for new users.Get the Set
of group names that have been associated with all the ApplicationRole
s
that have a backing (but potentially exceeded) license.
ApplicationRole
s that have a backing (but potentially
exceeded) license.
Returns the Set
of ApplicationRole
s that the given ApplicationUser
occupies seats in.
ApplicationUser
has to actively take a seat in the returned ApplicationRole
s
eg. for an ApplicationUser
who has access to SOFTWARE and implicitly (or explicitly) CORE, they will only have SOFTWARE returned.
For an ApplicationUser
who 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.
user | the user whose roles will be checked. |
---|
Set
of ApplicationRole
s that the given user
is actively taking seats.
Retrieve the number of available (unoccupied) user seats for the ApplicationRole
backed by a (potentially exceeded) license.
key | the key that identifies the licensed ApplicationRole . |
---|
ApplicationRole
is 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)Returns the ApplicationRole
identified by the given com.atlassian.application.api.ApplicationKey,
or none()
if no such ApplicationRole
exists.
Note: ApplicationRole
s 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.
role | the com.atlassian.application.api.ApplicationKey of the role to search for. |
---|
ApplicationRole
associated with the passed role identifier, or none()
.
Returns an immutable Set
of all ApplicationRole
s that are backed by a (potentially exceeded)
license.
Set
of all ApplicationRole
s that are backed by a (potentially exceeded) license.
Returns the Set
of ApplicationRole
s associated with the given Group
, or groups for
which the given group is a nested group (sub-group).
group | the group which roles will be checked. |
---|
Set
of ApplicationRole
s associated with the group or its super-groups.
Returns the Set
of ApplicationRole
s granted to the given ApplicationUser
.
user | the user whose roles will be checked. |
---|
Set
of ApplicationRole
s for the given user
.
Retrieve the number of active users for the given ApplicationRole
.
It will uniquely count all users who are found in the groups associated with the application.
key | the key that identifies the ApplicationRole . |
---|
ApplicationRole
, or zero if the
ApplicationRole
does not exist.
Returns true if the given user has been assigned to any ApplicationRole
that is backed by a
(potentially exceeded) license.
ApplicationRole
that is backed by a (potentially exceeded) license.
Returns true if the user limits of all of the given user's assigned ApplicationRole
s have been exceeded.
The user limit of an ApplicationRole
is 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.
user | the user whose roles will be checked. |
---|
true
if all of the user
's roles have user counts that exceed the number of seats
granted by licenses.
Determines whether the ApplicationRole
backed by a license
has the requested number of user seats available.
key | the key that identifies the ApplicationRole . |
---|---|
seatCount | the number of user seats that this ApplicationRole should have capacity for. |
true
if the ApplicationRole
for the provided ApplicationKey
has the number of user seats available.
false
if the there are not enough seats available.
Returns true if the number of users assigned to any ApplicationRole
exceeds 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.
Determines whether an application identified by the given ApplicationKey is installed and running in this JIRA instance AND has a backing license key.
key | the key that identifies the ApplicationRole backed by a (potentially exceeded) license. |
---|
true
when the ApplicationRole
backed by a (potentially exceeded) license
has an associated application installed and running in this JIRA instance.
Returns true
if the number of users assigned to the given ApplicationRole
exceeds the
number of seats granted by its license. This method unconditionally returns false
if 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.
role | the identifier of the ApplicationRole . |
---|
true
if the installed ApplicationRole
is exceeded or false
otherwise.
Removes any/all associations of the given group from all ApplicationRole
s
(irrespective of whether the ApplicationRole
s is backed by a license).
group | the group to remove. |
---|
Determines whether ApplicationRole
s are enabled.
true
when ApplicationRole
are enabled, false
otherwise.Save the passed ApplicationRole
information to the database.
This method will only accept the passed role if:
role | the role to save. |
---|
Gets 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.
In all cases this method will exclude Connect users from the count. In Cloud this will also exclude users who exist for the purpose of providing support (such as the Atlassian sysadmin user).
Implementations of this method should take performance into consideration, and ensure that the value is cached.
Use flush()
to clear the cache.
Returns true
if the passed user belongs to the ApplicationRole
associated with the given key.
NOTE: This does not check that the application is licensed with a valid license.
user | the user to check - if this is null, returns false |
---|---|
key | the key corresponding to the ApplicationRole |
Returns true
if the passed user occupies a seat in the ApplicationRole
associated with the given key.
user | the user to check - if this is null, returns false |
---|---|
key | the key corresponding to the ApplicationRole |