public interface LicenseService
Modifier and Type | Field and Description |
---|---|
static short |
BASE_CNTR_PRODUCT_ID
Controller product Id
|
Modifier and Type | Method and Description |
---|---|
AppLicense |
addLicense(String licKey,
String user)
Validates and adds a product license issued by the authorized SDN
licensing portal.
|
void |
addLicenseMetric(short productId,
LicenseMetric metric)
Add a new license metric.
|
Collection<AppLicense> |
checkExpiredLicenses()
Checks if any licenses are expired and mark them as expired in
database.
|
AppLicense |
deactivateLicense(short sno,
String user)
Deactivates an active license of a serial number for a license transfer
from one install id to another reasons.
|
AppLicense |
deactivateLicense(String licKey,
String user)
Deactivates an active license for a license transfer from one install
id to another reasons.
|
AppLicense |
getLicense(short sno)
Get a license details for a given serial number.
|
AppLicense |
getLicense(String key)
Get a license details for a given license key.
|
Collection<AppLicense> |
getLicenses()
Get all licenses stored in database.
|
Collection<AppLicense> |
getLicenses(short productId)
Get all licenses stored in database for a product.
|
LicenseType |
getLicenseType(short productId)
Get the product active base license type i.e.
|
LicenseMetric |
getMetricById(short productId,
short metricId)
Gets the metric associated with the Id
|
List<LicenseMetric> |
getProductMetrics(short productId)
Get the list of license metrics associated with a license product.
|
String |
getProductName(short productId)
Gets a product name given product Id.
|
Collection<Short> |
getRegisteredProducts()
Gets all registered licensed product IDs.
|
String |
installId()
Get the install id assigned for this install base.
|
boolean |
isLicenseTypeFound(short productId,
short metric,
LicenseType type)
Checks if a specific license type license is active for a product and
metric.
|
void |
registerProduct(LicenseProduct product)
Register a new product/app with the licensing framework.
|
void |
removeLicenseMetric(short productId,
LicenseMetric metric)
Remove a license metric.
|
void |
unRegisterProduct(LicenseProduct product)
Unregister a product/app from the licensing framework.
|
static final short BASE_CNTR_PRODUCT_ID
String installId()
AppLicense addLicense(String licKey, String user)
licKey
- encrypted license key that needs to be addeduser
- name of the user who is adding a licenseAppLicense
objectAppLicense deactivateLicense(String licKey, String user)
licKey
- encrypted license key that needs to be deactivateduser
- name of the user who is deactivating a licenseAppLicense
object if the license
deactivated successfully, otherwise return null.AppLicense deactivateLicense(short sno, String user)
sno
- license with serial number that needs to be deactivateduser
- name of the user who is adding a licenseAppLicense
object if the license
deactivated successfully, otherwise return null.AppLicense getLicense(short sno)
sno
- license serial numberAppLicense
objectAppLicense getLicense(String key)
key
- license keyAppLicense
objectCollection<AppLicense> getLicenses()
AppLicense
objectsCollection<AppLicense> getLicenses(short productId)
productId
- product idAppLicense
objectsLicenseType getLicenseType(short productId)
productId
- product idboolean isLicenseTypeFound(short productId, short metric, LicenseType type)
productId
- product idtype
- license typemetric
- license metric idCollection<AppLicense> checkExpiredLicenses()
AppLicense
objectsvoid registerProduct(LicenseProduct product) throws NullPointerException, InvalidLicenseProductException
product
- the product needs to be registeredNullPointerException
- if the product is nullInvalidLicenseProductException
- if the supplied product is
invalidvoid unRegisterProduct(LicenseProduct product)
product
- the product needs to unregisteredLicenseMetric getMetricById(short productId, short metricId)
productId
- product id of the metric associated withmetricId
- metric id of the metric to be retrievedList<LicenseMetric> getProductMetrics(short productId)
productId
- the license product idvoid addLicenseMetric(short productId, LicenseMetric metric)
productId
- license product idmetric
- the license metricvoid removeLicenseMetric(short productId, LicenseMetric metric)
productId
- license product idmetric
- the license metricCollection<Short> getRegisteredProducts()
String getProductName(short productId)
productId
- licensed product IdCopyright © 2016. All Rights Reserved.