Package com.spotfire.ws.pub
Interface LicenseService
-
public interface LicenseService
A public SOAP web service for the TIBCO Spotfire Server License functionality.Authorization
- All access to this service require an access token that is issued for the
"api.soap.license-service"
scope. - Modifying operations also require the calling user (the OAuth 2.0 client principal) to be a member of the Administrator group.
Important things to note
- Licenses are created when packages are deployed, there is no operation for creating a license.
Functionality
The functionality consists of two parts: Licenses and License Functions. A License consists of one or more License Functions, to use a fictitious example the License "Spotfire.Foo.Plots" may contain the License Functions: "createFooPlot", "drawFooPlot", "editFooColumn", "createFooDatasource" etc.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.
- Since:
- 6.5
- All access to this service require an access token that is issued for the
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVICE_SCOPE
The OAuth 2.0 scope needed to access any operation in this service.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
SERVICE_SCOPE
static final java.lang.String SERVICE_SCOPE
The OAuth 2.0 scope needed to access any operation in this service.- Since:
- 7.13
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLicensesForUser
java.util.List<java.lang.String> getLicensesForUser(UserName userName) throws LicenseServiceException
Returns the Licenses that are enabled for a certain user. To learn which License Functions that are enabled usegetFunctionsForUser(UserName, String)
.- Parameters:
userName
- which user to check- Returns:
- a list of all enabled Licenses
- Throws:
LicenseServiceException
- if an unexpected error occurs or if the user does not exist
-
getFunctionsForUser
java.util.List<java.lang.String> getFunctionsForUser(UserName userName, java.lang.String licenseName) throws LicenseServiceException
Returns the active License Functions for a certain user and License.- Parameters:
userName
- which user to checklicenseName
- which License to check- Returns:
- a list of the enabled License Functions
- Throws:
LicenseServiceException
- if an unexpected error occurs or if the user does not exist
-
getLicensesForGroup
java.util.List<java.lang.String> getLicensesForGroup(GroupName groupName, boolean includingHeritage) throws LicenseServiceException
Returns the Licenses that are enabled for a certain group. To learn which License Functions that are enabled usegetFunctionsForGroup(GroupName, String, boolean)
.- Parameters:
groupName
- which group to checkincludingHeritage
- iffalse
the operation will return the Licenses that are explicitly set on this group, iftrue
then the Licenses enabled through group membership will be returned as well.- Returns:
- a list of the enabled Licenses
- Throws:
LicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does not exist
-
getFunctionsForGroup
java.util.List<java.lang.String> getFunctionsForGroup(GroupName groupName, java.lang.String licenseName, boolean includingHeritage) throws LicenseServiceException
Returns the active License Functions for a certain group and License.- Parameters:
groupName
- which group to checklicenseName
- which License to checkincludingHeritage
- iffalse
the operation will return the License Functions that are explicitly set on this group, iftrue
then the Functions enabled through group membership will be returned as well- Returns:
- a list of the enabled License Functions will be returned.
- Throws:
LicenseServiceException
- if an unexpected error occurs or if the group does not exist
-
setLicenseAndFunctionsForGroup
void setLicenseAndFunctionsForGroup(GroupName groupName, java.lang.String licenseName, java.util.List<java.lang.String> licenseFunctionsNames) throws LicenseServiceException
Set the License and License Functions for a certain group. If License Functions is empty or null then all License Functions are enabled- Parameters:
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.- Throws:
LicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does not exist
-
removeLicenseForGroup
void removeLicenseForGroup(GroupName groupName, java.lang.String licenseName) throws LicenseServiceException
Remove a License set directly on a group; will not do anything with Licenses enabled through group membership.- Parameters:
groupName
- the group to remove License forlicenseName
- the License to remove- Throws:
LicenseServiceException
- if an unexpected error occurs, if the License does not exist, or if the group does not exist
-
listLicenses
java.util.List<java.lang.String> listLicenses() throws LicenseServiceException
Returns the all Licenses that exist in the system. Licenses are added when packages are deployed.- Returns:
- a list of Licenses
- Throws:
LicenseServiceException
- if an unexpected error occurs
-
listFunctionsForLicense
java.util.List<java.lang.String> listFunctionsForLicense(java.lang.String licenseName) throws LicenseServiceException
Returns all License Functions that exist on the system for a certain License in the system. License Functions are added when packages are deployed.- Parameters:
licenseName
- the name of the License to list License Functions for- Returns:
- a list of License Functions
- Throws:
LicenseServiceException
- if an unexpected error occurs
-
-