Class StoreLocatorPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
de.hybris.platform.yacceleratorstorefront.controllers.pages.StoreLocatorPageController
@Controller
@RequestMapping("/store-finder")
public class StoreLocatorPageController
extends AbstractSearchPageController
Controller for store locator search and detail pages.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
AbstractSearchPageController.SearchResultsData<RESULT>, AbstractSearchPageController.ShowModeNested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
MAX_PAGE_LIMITFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindStores(int page, AbstractSearchPageController.ShowMode showMode, String sortCode, String locationQuery, Double latitude, Double longitude, StoreFinderForm storeFinderForm, org.springframework.ui.Model model, org.springframework.validation.BindingResult bindingResult) getGoogleApiKey(javax.servlet.http.HttpServletRequest request) protected AbstractPageModelgetStoreFinderPage(org.springframework.ui.Model model) protected intGet the default search page size.searchByCurrentPosition(int page, AbstractSearchPageController.ShowMode showMode, String sortCode, StorePositionForm storePositionForm, org.springframework.ui.Model model) protected voidsetUpMetaData(String locationQuery, org.springframework.ui.Model model) protected voidsetUpNoResultsErrorMessage(org.springframework.ui.Model model, StoreFinderSearchPageData<PointOfServiceData> searchResult) protected voidsetUpPageData(org.springframework.ui.Model model, StoreFinderSearchPageData<PointOfServiceData> searchResult, List<Breadcrumb> breadCrumbsList) protected voidsetUpPageForms(org.springframework.ui.Model model) protected voidsetUpPageTitle(String searchText, org.springframework.ui.Model model) protected voidsetUpPosition(org.springframework.ui.Model model, GeoPoint geoPoint) protected voidsetUpSearchResultsForLocationQuery(String locationQuery, PageableData pageableData, org.springframework.ui.Model model) protected voidsetUpSearchResultsForPosition(GeoPoint geoPoint, PageableData pageableData, org.springframework.ui.Model model) protected voidupdateLocalUserPreferences(GeoPoint geoPoint, String location) Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
calculateShowAll, calculateShowPaged, convertBreadcrumbsToFacets, createEmptyPagination, createPageableData, encodeSearchPageData, existsFacetValueWithName, getMaxSearchPageSize, getSearchPageSize, isShowAllAllowed, populateModel, processFacetData, processFacetDatas, refineFacetsMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Constructor Details
-
StoreLocatorPageController
public StoreLocatorPageController()
-
-
Method Details
-
getGoogleApiVersion
-
getGoogleApiKey
@ModelAttribute("googleApiKey") public String getGoogleApiKey(javax.servlet.http.HttpServletRequest request) -
getStoreFinderPage
@RequestMapping(method=GET) public String getStoreFinderPage(org.springframework.ui.Model model) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
findStores
@RequestMapping(method=GET, params="q") public String findStores(@RequestParam(value="page",defaultValue="0") int page, @RequestParam(value="show",defaultValue="Page") AbstractSearchPageController.ShowMode showMode, @RequestParam(value="sort",required=false) String sortCode, @RequestParam("q") String locationQuery, @RequestParam(value="latitude",required=false) Double latitude, @RequestParam(value="longitude",required=false) Double longitude, StoreFinderForm storeFinderForm, org.springframework.ui.Model model, org.springframework.validation.BindingResult bindingResult) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
searchByCurrentPosition
@RequestMapping(value="/position", method=POST) public String searchByCurrentPosition(@RequestParam(value="page",defaultValue="0") int page, @RequestParam(value="show",defaultValue="Page") AbstractSearchPageController.ShowMode showMode, @RequestParam(value="sort",required=false) String sortCode, StorePositionForm storePositionForm, org.springframework.ui.Model model) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
setUpMetaData
-
setUpNoResultsErrorMessage
protected void setUpNoResultsErrorMessage(org.springframework.ui.Model model, StoreFinderSearchPageData<PointOfServiceData> searchResult) -
setUpPageData
protected void setUpPageData(org.springframework.ui.Model model, StoreFinderSearchPageData<PointOfServiceData> searchResult, List<Breadcrumb> breadCrumbsList) -
setUpSearchResultsForPosition
protected void setUpSearchResultsForPosition(GeoPoint geoPoint, PageableData pageableData, org.springframework.ui.Model model) -
setUpPosition
-
setUpSearchResultsForLocationQuery
protected void setUpSearchResultsForLocationQuery(String locationQuery, PageableData pageableData, org.springframework.ui.Model model) -
updateLocalUserPreferences
-
setUpPageForms
protected void setUpPageForms(org.springframework.ui.Model model) -
setUpPageTitle
-
getStoreFinderPage
- Throws:
CMSItemNotFoundException
-
getStoreLocatorPageSize
protected int getStoreLocatorPageSize()Get the default search page size.- Returns:
- the number of results per page, 0 (zero) indicated 'default' size should be used
-