Package de.licenseapi
Class LicenseValidator
- java.lang.Object
-
- de.licenseapi.LicenseValidator
-
public class LicenseValidator extends Object
-
-
Constructor Summary
Constructors Constructor Description LicenseValidator(String validationKey)
Creates a newLicenseValidator
with the given validation key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRetries()
Gets the current amount of retries.String
getValidationKey()
Gets the current validation keyLicense
retrieveLicense(String licenseKey)
Retrieves the license from the license key.void
setRetries(int retries)
Gets the current amount of retries.
-
-
-
Constructor Detail
-
LicenseValidator
public LicenseValidator(String validationKey)
Creates a newLicenseValidator
with the given validation key.- Parameters:
validationKey
- The validation key of your project. You can find it in the project settings.
-
-
Method Detail
-
retrieveLicense
public License retrieveLicense(String licenseKey)
Retrieves the license from the license key.- Parameters:
licenseKey
- The license key you want to validate- Returns:
- a
License
object with the license information ornull
if the validation key is invalid.
-
setRetries
public void setRetries(int retries)
Gets the current amount of retries. If the amount of retries is 0, the license will be validated once.- Parameters:
retries
- the new amount of retries
-
getRetries
public int getRetries()
Gets the current amount of retries. If the amount of retries is 0, the license will be validated once.- Returns:
- the current amount of retries
-
getValidationKey
public String getValidationKey()
Gets the current validation key- Returns:
- the current validation key
-
-