Class HybrisLicenceValidator
java.lang.Object
de.hybris.platform.licence.internal.HybrisLicenceValidator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckLicence(Licence licence) Checks whether passed licence file is valid.getDaysLeft(Licence licence, HybrisDataSource dataSource) This method returns number of days left for licence if it is develop/demo licence, otherwise null.protected HybrisLicenceCryptoprotected HybrisLicenceDAObooleanisLicenceExpiredIfDemoLicence(Licence licence, HybrisDataSource dataSource) This method checks whether demo/develop has expired.
-
Field Details
-
DEMO_LICENCE_DAYS
public static final int DEMO_LICENCE_DAYS- See Also:
-
-
Constructor Details
-
HybrisLicenceValidator
public HybrisLicenceValidator()
-
-
Method Details
-
checkLicence
public ValidationResult checkLicence(Licence licence) throws IllegalStateException, NullPointerException Checks whether passed licence file is valid.- Parameters:
licence- to check- Throws:
IllegalStateException- in case of validation failure, exception message contains reason of validation failureNullPointerException- when passed licence parameter is null
-
getHybrisCrypto
-
isLicenceExpiredIfDemoLicence
This method checks whether demo/develop has expired. Demo/develop licence is valid for 30 days since last initialization. This method required system to be initialized.- Parameters:
licence- to check- Returns:
- true if licence has expired, false otherwise
-
getDaysLeft
This method returns number of days left for licence if it is develop/demo licence, otherwise null.- Parameters:
licence- to check- Returns:
- number of days left (negative value if expired) or null if it is not develop/demo licence
-
getHybrisLicenceDAO
-