@RefreshScope @Component public class LicenseKeyManagerUtil extends Object
| Constructor and Description |
|---|
LicenseKeyManagerUtil() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areValidPermissions(List<String> inputPermissions)
This method validates whether the input permissions are from the master list
or not.
|
String |
concatPermissionsIntoASingleRow(List<String> permissionsList)
This method adds all the permissions into a single row separated by comma.
|
String |
generateLicense()
Method that generates a random license key of specified length.
|
java.time.LocalDateTime |
getCurrentTimeInUTCTimeZone()
Method that returns the current date-time in UTC time zone.
|
void |
validateRequestParameters(String tspID,
String licenseKey,
List<String> permissions)
Method to validate TSP ID, License Key, and the list of permissions.
|
void |
validateTSP(String tspID)
Method to validate TSP ID.
|
void |
validateTSPAndLicenseKey(String tspID,
String licenseKey)
Method to validate TSP ID and License Key.
|
public String concatPermissionsIntoASingleRow(List<String> permissionsList)
permissionsList - the list of permissions.public boolean areValidPermissions(List<String> inputPermissions)
inputPermissions - the list of input permissions.public java.time.LocalDateTime getCurrentTimeInUTCTimeZone()
public String generateLicense()
public void validateTSP(String tspID)
tspID - the TSP ID to be validated.public void validateTSPAndLicenseKey(String tspID, String licenseKey)
tspID - the TSP ID to be validated.licenseKey - the license key to be validated.Copyright © 2020. All rights reserved.