Class DefaultCustomerService

java.lang.Object
de.hybris.platform.commerceservices.customer.impl.DefaultCustomerService
All Implemented Interfaces:
CustomerService

public class DefaultCustomerService extends Object implements CustomerService
Provides methods for retrieving the customer and verify customer id
  • Constructor Details

    • DefaultCustomerService

      public DefaultCustomerService(CustomerDao customerDao, String regexp)
      Service constructor
      Parameters:
      customerDao - DAO for retrieving customer
      regexp - regular expression for UUID validation
  • Method Details

    • isUUID

      public boolean isUUID(String id)
      Description copied from interface: CustomerService
      Verifies if given id is in UUID format
      Specified by:
      isUUID in interface CustomerService
      Parameters:
      id - the id
      Returns:
      true if UUID format
    • getCustomerByCustomerId

      public CustomerModel getCustomerByCustomerId(String customerId)
      Description copied from interface: CustomerService
      Gets the customer by customerId
      Specified by:
      getCustomerByCustomerId in interface CustomerService
      Parameters:
      customerId - the customerID in UUID format of the customer
      Returns:
      the found customer
    • getFirstCustomerByBaseSitePK

      public Optional<CustomerModel> getFirstCustomerByBaseSitePK(PK baseSitePK)
      Description copied from interface: CustomerService
      Gets the first customer who registered to this BaseSite
      Specified by:
      getFirstCustomerByBaseSitePK in interface CustomerService
      Parameters:
      baseSitePK - BaseSite PK
      Returns:
      return Optional.empty() if no one customer found and Optional.of(customer) is customer found
    • getCustomerDao

      protected CustomerDao getCustomerDao()