Package com.vaadin.pro.licensechecker
Class LicenseChecker
java.lang.Object
com.vaadin.pro.licensechecker.LicenseChecker
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckLicense(String productName, String productVersion) Deprecated.static voidcheckLicense(String productName, String productVersion, BuildType buildType) Checks the license for the given product version.static voidcheckLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler) Checks the license for the given product version.static voidcheckLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler, int timeoutKeyUrlHandler) Checks the license for the given product version.static voidcheckLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler, String machineId, ProKey proKey, SubscriptionKey subscriptionKey, OfflineKey offlineKey) Checks the license for the given pro key and product version.static voidcheckLicense(String productName, String productVersion, java.util.function.Consumer<String> noKeyUrlHandler) Deprecated.static voidcheckLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback) Checks the license for the given product version in the background and invokes the callback when done.static voidcheckLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler) Checks the license for the given product version in the background and invokes the callback when done.static voidcheckLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler, int timeoutKeyUrlHandler) Checks the license for the given product version in the background and invokes the callback when done.static voidcheckLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler, String machineId, ProKey proKey, SubscriptionKey subscriptionKey, OfflineKey offlineKey) Checks the license for the given pro key and product version in the background and invokes the callback when done.static voidcheckLicenseAsync(String productName, String productVersion, LicenseChecker.Callback callback) Deprecated.static voidcheckLicenseAsync(String productName, String productVersion, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler) Deprecated.static voidcheckLicenseFromStaticBlock(String productName, String productVersion) Deprecated.static voidcheckLicenseFromStaticBlock(String productName, String productVersion, BuildType buildType) Checks the license for the given product version from astaticblock.static booleanisValidLicense(String productName, String productVersion, BuildType buildType) Checks the license for the given product version.static voidsetStrictOffline(boolean strictOffline)
-
Constructor Details
-
LicenseChecker
public LicenseChecker()
-
-
Method Details
-
checkLicenseFromStaticBlock
@Deprecated public static void checkLicenseFromStaticBlock(String productName, String productVersion) Deprecated. -
checkLicenseFromStaticBlock
public static void checkLicenseFromStaticBlock(String productName, String productVersion, BuildType buildType) Checks the license for the given product version from astaticblock.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: production or development- Throws:
ExceptionInInitializerError- if the license check fails
-
checkLicense
Deprecated. -
checkLicense
Checks the license for the given product version.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or production- Throws:
LicenseException- if the license check fails
-
checkLicense
public static void checkLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler, String machineId, ProKey proKey, SubscriptionKey subscriptionKey, OfflineKey offlineKey) Checks the license for the given pro key and product version.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productionnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.machineId- the identifier of machine which owns pro keyproKey- the pro key to be validatedofflineKey- the offline key to be validated- Throws:
LicenseException- if the license check fails
-
checkLicense
public static void checkLicense(String productName, String productVersion, java.util.function.Consumer<String> noKeyUrlHandler) Deprecated. -
checkLicense
public static void checkLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler) Checks the license for the given product version.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productionnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.- Throws:
LicenseException- if the license check fails
-
checkLicense
public static void checkLicense(String productName, String productVersion, BuildType buildType, java.util.function.Consumer<String> noKeyUrlHandler, int timeoutKeyUrlHandler) Checks the license for the given product version.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productionnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.timeoutKeyUrlHandler- timeout for the key url handler- Throws:
LicenseException- if the license check fails
-
isValidLicense
public static boolean isValidLicense(String productName, String productVersion, BuildType buildType) Checks the license for the given product version. Returnstrueif the license is valid,falseotherwise.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or production- Returns:
trueif the license is valid,falseotherwise
-
checkLicenseAsync
@Deprecated public static void checkLicenseAsync(String productName, String productVersion, LicenseChecker.Callback callback) Deprecated. -
checkLicenseAsync
public static void checkLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback) Checks the license for the given product version in the background and invokes the callback when done.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productioncallback- the callback to invoke with the result
-
checkLicenseAsync
public static void checkLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler, String machineId, ProKey proKey, SubscriptionKey subscriptionKey, OfflineKey offlineKey) Checks the license for the given pro key and product version in the background and invokes the callback when done.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productioncallback- the callback to invoke with the resultnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.machineId- the identifier of machine which owns pro keyproKey- the pro key to be validatedofflineKey- the offline key to be validated- Throws:
LicenseException- if the license check fails
-
checkLicenseAsync
@Deprecated public static void checkLicenseAsync(String productName, String productVersion, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler) Deprecated. -
checkLicenseAsync
public static void checkLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler) Checks the license for the given product version in the background and invokes the callback when done.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productioncallback- the callback to invoke with the resultnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.
-
checkLicenseAsync
public static void checkLicenseAsync(String productName, String productVersion, BuildType buildType, LicenseChecker.Callback callback, java.util.function.Consumer<String> noKeyUrlHandler, int timeoutKeyUrlHandler) Checks the license for the given product version in the background and invokes the callback when done.- Parameters:
productName- the name of the product to checkproductVersion- the version of the product to checkbuildType- the type of build: development or productioncallback- the callback to invoke with the resultnoKeyUrlHandler- a handler that is invoked to open the vaadin.com URL to download the key file. Used when no key file is avialable.timeoutKeyUrlHandler- timeout for the key url handler
-
setStrictOffline
public static void setStrictOffline(boolean strictOffline)
-
checkLicense(String, String, BuildType)