Class StoreLocatorPageController


@Controller @RequestMapping("/store-finder") public class StoreLocatorPageController extends AbstractSearchPageController
Controller for store locator search and detail pages.
  • Constructor Details

    • StoreLocatorPageController

      public StoreLocatorPageController()
  • Method Details

    • getGoogleApiVersion

      @ModelAttribute("googleApiVersion") public String 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

      protected void setUpMetaData(String locationQuery, org.springframework.ui.Model model)
    • 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

      protected void setUpPosition(org.springframework.ui.Model model, GeoPoint geoPoint)
    • setUpSearchResultsForLocationQuery

      protected void setUpSearchResultsForLocationQuery(String locationQuery, PageableData pageableData, org.springframework.ui.Model model)
    • updateLocalUserPreferences

      protected void updateLocalUserPreferences(GeoPoint geoPoint, String location)
    • setUpPageForms

      protected void setUpPageForms(org.springframework.ui.Model model)
    • setUpPageTitle

      protected void setUpPageTitle(String searchText, org.springframework.ui.Model model)
    • getStoreFinderPage

      protected AbstractPageModel getStoreFinderPage() throws CMSItemNotFoundException
      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