Interface LicenseManager
-
public interface LicenseManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLicenseStateUpdateListener(LicenseStateUpdateListener listener)
Register with the LicenseManager to receive updates about any license change, regardless of module.void
addLicenseStateUpdateListener(java.lang.String moduleId, LicenseStateUpdateListener listener)
Register with the LicenseManager to receive updates about a specified modules LicenseState.DemoCountdownState
getDemoCountdownState()
Returns what kind of demo state the system is currently inint
getDemoTimeRemaining()
Returns the amount of demo time remaining in seconds.License
getLicense()
Gets the currently installed License.LicenseState
getLicenseState(java.lang.String moduleId)
Gets the current LicenseState for a specified module.java.util.Optional<ModuleLicense>
getModuleLicense(java.lang.String moduleId)
Looks up the module license details for a specific module.java.util.List<License>
getSecondaryLicenses()
A gateway may have multiple licenses installed.void
removeLicenseStateUpdateListener(LicenseStateUpdateListener listener)
Remove a LicenseStateUpdateListener that is not registered to a specific modulevoid
removeLicenseStateUpdateListener(java.lang.String moduleId, LicenseStateUpdateListener listener)
Stop receiving LicenseState updates for a specified module.
-
-
-
Method Detail
-
addLicenseStateUpdateListener
void addLicenseStateUpdateListener(java.lang.String moduleId, LicenseStateUpdateListener listener)
Register with the LicenseManager to receive updates about a specified modules LicenseState.- Parameters:
moduleId
- The id of the module you want to receive LicenseState updates for.listener
- LicenseStateUpdateListener that will receive the updates.
-
addLicenseStateUpdateListener
void addLicenseStateUpdateListener(LicenseStateUpdateListener listener)
Register with the LicenseManager to receive updates about any license change, regardless of module.- Parameters:
listener
- LicenseStateUpdateListener that will receive the updates.
-
removeLicenseStateUpdateListener
void removeLicenseStateUpdateListener(java.lang.String moduleId, LicenseStateUpdateListener listener)
Stop receiving LicenseState updates for a specified module.- Parameters:
moduleId
- The id of the module you want to stop receiving LicenseState updates for.listener
- LicenseStateUpdateListener that will no longer receive the updates.
-
removeLicenseStateUpdateListener
void removeLicenseStateUpdateListener(LicenseStateUpdateListener listener)
Remove a LicenseStateUpdateListener that is not registered to a specific module- Parameters:
listener
- LicenseStateUpdateListener that will no longer receive the updates.
-
getModuleLicense
java.util.Optional<ModuleLicense> getModuleLicense(java.lang.String moduleId)
Looks up the module license details for a specific module. This method will look through all installed licenses, not just the primary license.
-
getLicense
@Nullable License getLicense()
Gets the currently installed License. Note that this is only the primary license, and may therefore be missing information about some modules. UsegetModuleLicense(String)
to look up license details about a module.- Returns:
- Currently installed License.
-
getSecondaryLicenses
java.util.List<License> getSecondaryLicenses()
A gateway may have multiple licenses installed. Only one may contribute to the platform's license (the "primary") license, but others may add licenses for modules. These are called secondary licenses.
-
getLicenseState
LicenseState getLicenseState(java.lang.String moduleId)
Gets the current LicenseState for a specified module.- Parameters:
moduleId
- The id of the module you want the LicenseState for.- Returns:
- LicenseState of the specified module.
-
getDemoTimeRemaining
int getDemoTimeRemaining()
Returns the amount of demo time remaining in seconds.
-
getDemoCountdownState
DemoCountdownState getDemoCountdownState()
Returns what kind of demo state the system is currently in
-
-