Class DefaultCustomerService
java.lang.Object
de.hybris.platform.commerceservices.customer.impl.DefaultCustomerService
- All Implemented Interfaces:
CustomerService
Provides methods for retrieving the customer and verify customer id
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCustomerService(CustomerDao customerDao, String regexp) Service constructor -
Method Summary
Modifier and TypeMethodDescriptiongetCustomerByCustomerId(String customerId) Gets the customer by customerIdprotected CustomerDaogetFirstCustomerByBaseSitePK(PK baseSitePK) Gets the first customer who registered to this BaseSitebooleanVerifies if given id is in UUID format
-
Constructor Details
-
DefaultCustomerService
Service constructor- Parameters:
customerDao- DAO for retrieving customerregexp- regular expression for UUID validation
-
-
Method Details
-
isUUID
Description copied from interface:CustomerServiceVerifies if given id is in UUID format- Specified by:
isUUIDin interfaceCustomerService- Parameters:
id- the id- Returns:
trueif UUID format
-
getCustomerByCustomerId
Description copied from interface:CustomerServiceGets the customer by customerId- Specified by:
getCustomerByCustomerIdin interfaceCustomerService- Parameters:
customerId- the customerID in UUID format of the customer- Returns:
- the found customer
-
getFirstCustomerByBaseSitePK
Description copied from interface:CustomerServiceGets the first customer who registered to this BaseSite- Specified by:
getFirstCustomerByBaseSitePKin interfaceCustomerService- Parameters:
baseSitePK- BaseSite PK- Returns:
- return Optional.empty() if no one customer found and Optional.of(customer) is customer found
-
getCustomerDao
-