Class DefaultPointOfServiceService
- java.lang.Object
-
- de.hybris.platform.storelocator.pos.impl.DefaultPointOfServiceService
-
- All Implemented Interfaces:
PointOfServiceService
public class DefaultPointOfServiceService extends java.lang.Object implements PointOfServiceService
Implementation for PointOfServiceService - interface for point of service look up functionality.
-
-
Constructor Summary
Constructors Constructor Description DefaultPointOfServiceService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StoreCountInfobuildStoreCountInfo(StoreCountType type, java.lang.Integer count, java.lang.String isoCode, java.lang.String name)Builds aStoreCountInfoobjectjava.util.List<StoreCountInfo>getPointOfServiceCounts(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 PointOfServiceDaogetPointOfServiceDao()PointOfServiceModelgetPointOfServiceForName(java.lang.String name)Returns point of service by its name.protected java.util.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)
-
-
-
Method Detail
-
getPointOfServiceForName
public PointOfServiceModel getPointOfServiceForName(java.lang.String name) throws UnknownIdentifierException
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
public java.util.List<StoreCountInfo> getPointOfServiceCounts(BaseStoreModel baseStore)
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 java.util.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, java.lang.Integer count, java.lang.String isoCode, java.lang.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
protected PointOfServiceDao getPointOfServiceDao()
-
setPointOfServiceDao
public void setPointOfServiceDao(PointOfServiceDao pointOfServiceDao)
-
-