Class HybrisLicenceValidator

java.lang.Object
de.hybris.platform.licence.internal.HybrisLicenceValidator

public class HybrisLicenceValidator extends Object
  • Field Details

  • 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 failure
      NullPointerException - when passed licence parameter is null
    • getHybrisCrypto

      protected HybrisLicenceCrypto getHybrisCrypto()
    • isLicenceExpiredIfDemoLicence

      public boolean isLicenceExpiredIfDemoLicence(Licence licence, HybrisDataSource dataSource)
      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

      public Integer getDaysLeft(Licence licence, HybrisDataSource dataSource)
      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

      protected HybrisLicenceDAO getHybrisLicenceDAO()