Class DefaultValidatableService

java.lang.Object
de.hybris.platform.cmsfacades.common.validator.impl.DefaultValidatableService
All Implemented Interfaces:
ValidatableService

public class DefaultValidatableService extends Object implements ValidatableService
Default Implementation of the ValidatableService. This implementation executes the validatable supplier and then checks if there are errors registered. If there are errors present in current ValidationErrors, then it throws a validation exception with the list of Errors.
  • Constructor Details

    • DefaultValidatableService

      public DefaultValidatableService()
  • Method Details

    • execute

      public <T> T execute(Supplier<T> validatable)
      Description copied from interface: ValidatableService
      Executes the validatable supplier to collect any validation error after execution
      Specified by:
      execute in interface ValidatableService
      Parameters:
      validatable - the validatable supplier.
      Returns:
      the expected result after successful validation
    • isEmptyCollection

      protected boolean isEmptyCollection(Collection<?> c)
      Verifies whether the collection is empty or not.
    • getValidationErrorsProvider

      protected ValidationErrorsProvider getValidationErrorsProvider()
    • setValidationErrorsProvider

      public void setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider)