public final class Licensing extends Object
Modifier and Type | Method and Description |
---|---|
static void |
activateLicense(String license)
Loads a DME Component Libraries license from the specified string.
|
static LicensedComponent |
findComponent(String componentName)
Find a licensed component of the given name, if a license has been activated for that component.
|
static ZonedDateTime |
getComponentExpirationDate(String componentName)
Gets the expiration date of the specified component.
|
static Iterable<LicensedComponent> |
getLicensedComponents()
Gets a list of components that are licensed for use.
|
static boolean |
isComponentLicenseValid(String componentName)
Determines if a valid license is available for the specified component.
|
static void |
validateComponentLicense(String componentName)
Checks that the license for a specified component is valid, and throws an exception if it is not.
|
public static void activateLicense(@Nonnull String license)
license
- The string value of the license from the license file.public static boolean isComponentLicenseValid(@Nonnull String componentName)
componentName
- The component to check.public static void validateComponentLicense(@Nonnull String componentName)
componentName
- The component to check.@Nonnull public static ZonedDateTime getComponentExpirationDate(@Nonnull String componentName)
componentName
- The component to check.public static Iterable<LicensedComponent> getLicensedComponents()
@Nullable public static LicensedComponent findComponent(@Nonnull String componentName)
componentName
- The component to look for.