Class DefaultPointOfServiceService
java.lang.Object
de.hybris.platform.storelocator.pos.impl.DefaultPointOfServiceService
- All Implemented Interfaces:
PointOfServiceService
Implementation for PointOfServiceService - interface for point of service look up functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StoreCountInfobuildStoreCountInfo(StoreCountType type, Integer count, String isoCode, String name) Builds aStoreCountInfoobjectgetPointOfServiceCounts(BaseStoreModel baseStore) Returns a list ofStoreCountInfofor all countries that have storesPointOfServiceModeland a list ofStoreCountInfofor each region (if any) within a country case that region have storesPointOfServiceModelprotected PointOfServiceDaoReturns point of service by its name.protected List<StoreCountInfo>populateRegionStoreCountInfo(CountryModel country, BaseStoreModel currentBaseStore) Populates a list ofStoreCountInfowith the region information given a country Return an empty list if the country have no regionsvoidsetPointOfServiceDao(PointOfServiceDao pointOfServiceDao)
-
Constructor Details
-
DefaultPointOfServiceService
public DefaultPointOfServiceService()
-
-
Method Details
-
getPointOfServiceForName
Description copied from interface:PointOfServiceServiceReturns point of service by its name.- Specified by:
getPointOfServiceForNamein interfacePointOfServiceService- Parameters:
name- the name of POS- Returns:
- the point of service
- Throws:
UnknownIdentifierException- the unknown identifier exception when no POS with given name was found
-
getPointOfServiceCounts
Description copied from interface:PointOfServiceServiceReturns a list ofStoreCountInfofor all countries that have storesPointOfServiceModeland a list ofStoreCountInfofor each region (if any) within a country case that region have storesPointOfServiceModel- Specified by:
getPointOfServiceCountsin interfacePointOfServiceService- Parameters:
baseStore-BaseStoreModel- Returns:
- the count of the stores per Country and Region if any
-
populateRegionStoreCountInfo
protected List<StoreCountInfo> populateRegionStoreCountInfo(CountryModel country, BaseStoreModel currentBaseStore) Populates a list ofStoreCountInfowith the region information given a country Return an empty list if the country have no regions- Parameters:
country- givenCountryModel- Returns:
- populated list of
StoreCountInfofor a given country
-
buildStoreCountInfo
protected StoreCountInfo buildStoreCountInfo(StoreCountType type, Integer count, String isoCode, String name) Builds aStoreCountInfoobject- Parameters:
type- Either aStoreCountType.COUNTRYorStoreCountType.REGIONcount- the store countisoCode- the region or the country's given isoCodename- the region or the country's given name- Returns:
StoreCountInfobuilt with the given information
-
getPointOfServiceDao
-
setPointOfServiceDao
-