public class DefaultLicenseValidator extends Object implements LicenseValidator
LicenseValidator, which simply checks that the license is active and not expired.| Constructor and Description |
|---|
DefaultLicenseValidator() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFormattedDate(long time) |
String |
getLicenseDescription(License license) |
void |
validateLicense(License license)
Ensures the current date is between the license's good-after and good-before dates (the license
has taken effect and hasn't expired).
|
public void validateLicense(License license) throws InvalidLicenseException
validateLicense in interface LicenseValidatorlicense - The license to validateInvalidLicenseException - when the license is invalid for any reason; the implementer is required to provide adequate description in this exception to indicate why the license is invalid; extending the exception is encouragedExpiredLicenseException - when the license is expired.InvalidLicenseException,
ExpiredLicenseExceptionpublic String getFormattedDate(long time)
Copyright © 2010-2013 NWTS Java Code. All Rights Reserved. Licensed Under the Apache License version 2.0.