public interface LicenseService
Important things to note:
Licenses are assigned to groups only. If a License is set on a group, but no License Function is specified, that means that all License Functions of that License are enabled. On the other hand if a specific License Function is enabled then the rest of the License Functions are not enabled.
Licenses are assigned to groups, a user will get the maximum privileges of all group memberships. Note that group memberships can be recursive.
In addition to being a member of the API User group membership in the Administrator group is required to manipulate Licenses.
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getFunctionsForGroup(GroupName groupName,
java.lang.String licenseName,
boolean includingHeritage)
Returns the active License Functions for a certain group and License.
|
java.util.List<java.lang.String> |
getFunctionsForUser(UserName userName,
java.lang.String licenseName)
Returns the active License Functions for a certain user and License.
|
java.util.List<java.lang.String> |
getLicensesForGroup(GroupName groupName,
boolean includingHeritage)
Returns the Licenses that are enabled for a certain group.
|
java.util.List<java.lang.String> |
getLicensesForUser(UserName userName)
Returns the Licenses that are enabled for a certain user.
|
java.util.List<java.lang.String> |
listFunctionsForLicense(java.lang.String licenseName)
Returns all License Functions that exist on the system for a certain License in the system.
|
java.util.List<java.lang.String> |
listLicenses()
Returns the all Licenses that exist in the system.
|
void |
removeLicenseForGroup(GroupName groupName,
java.lang.String licenseName)
Remove a License set directly on a group; will not do anything with Licenses enabled through group membership.
|
void |
setLicenseAndFunctionsForGroup(GroupName groupName,
java.lang.String licenseName,
java.util.List<java.lang.String> licenseFunctionsNames)
Set the License and License Functions for a certain group.
|
java.util.List<java.lang.String> getLicensesForUser(UserName userName) throws LicenseServiceException
getFunctionsForUser(UserName, String)
.userName
- which user to checkLicenseServiceException
- if an unexpected error occurs or if the user does not existjava.util.List<java.lang.String> getFunctionsForUser(UserName userName, java.lang.String licenseName) throws LicenseServiceException
userName
- which user to checklicenseName
- which License to checkLicenseServiceException
- if an unexpected error occurs or if the user does not existjava.util.List<java.lang.String> getLicensesForGroup(GroupName groupName, boolean includingHeritage) throws LicenseServiceException
getFunctionsForGroup(GroupName, String, boolean)
.groupName
- which group to checkincludingHeritage
- if false
the method will return the Licenses that are explicitly set on this
group, if true
then the Licenses enabled through group membership will be returned as well.LicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does
not existjava.util.List<java.lang.String> getFunctionsForGroup(GroupName groupName, java.lang.String licenseName, boolean includingHeritage) throws LicenseServiceException
groupName
- which group to checklicenseName
- which License to checkincludingHeritage
- if false
the method will return the License Functions that are explicitly set on
this group, if true
then the Functions enabled through group membership will be returned as wellLicenseServiceException
- if an unexpected error occurs or if the group does not existvoid setLicenseAndFunctionsForGroup(GroupName groupName, java.lang.String licenseName, java.util.List<java.lang.String> licenseFunctionsNames) throws LicenseServiceException
groupName
- the group to set Licenses forlicenseName
- the License namelicenseFunctionsNames
- the License Functions to enable, if empty then all License Functions for this License
are enabled.LicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does
not existvoid removeLicenseForGroup(GroupName groupName, java.lang.String licenseName) throws LicenseServiceException
groupName
- the group to remove License forlicenseName
- the License to removeLicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does
not existjava.util.List<java.lang.String> listLicenses() throws LicenseServiceException
LicenseServiceException
- if an unexpected error occursjava.util.List<java.lang.String> listFunctionsForLicense(java.lang.String licenseName) throws LicenseServiceException
licenseName
- the name of the License to list License Functions forLicenseServiceException
- if an unexpected error occursCopyright © 2013-2020 TIBCO Software Inc. All Rights Reserved.