public class CustomerLicense extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CREATION_DATE_KEY |
static String |
EXPIRATION_DATE_KEY |
static String |
FEATURE_KEY |
static String |
VERSIONS_KEY |
| Constructor and Description |
|---|
CustomerLicense(String licName,
ClassLoader artifactClassLoader,
ProviderLicense providerLicense)
Creates a new
CustomerLicense. |
| Modifier and Type | Method and Description |
|---|---|
String |
getExpirationDate() |
String |
getLicFileName() |
boolean |
hasValidDate()
Validates the expiration and creation date of the license.
|
boolean |
hasValidEntitlement(String requiredEntitlement)
Validates if the license contains the entitlement.
|
boolean |
hasValidVersion(String version) |
boolean |
isValid(String pluginVersion,
String requiredEntitlement)
Validates the license.
|
public static final String FEATURE_KEY
public static final String VERSIONS_KEY
public static final String CREATION_DATE_KEY
public static final String EXPIRATION_DATE_KEY
public CustomerLicense(String licName, ClassLoader artifactClassLoader, ProviderLicense providerLicense) throws InvalidKeyException
CustomerLicense.licName - the license file name.artifactClassLoader - the classloader to use for loading the license. Must be the one of the artifact that contains it.providerLicense - license key of the provider of the customer license.InvalidKeyException - if the customer license could not be read using the provider license key.public boolean isValid(String pluginVersion, String requiredEntitlement)
pluginVersion - version of the plugin that is being used to validate if the license supports it.requiredEntitlement - expected entitlement within the license.public boolean hasValidVersion(String version)
public boolean hasValidEntitlement(String requiredEntitlement)
requiredEntitlement - the expected entitlement within the license.public boolean hasValidDate()
public String getLicFileName()
public String getExpirationDate()
Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.