Package org.hoteia.qalingo.core.web.mvc.viewbean

Examples of org.hoteia.qalingo.core.web.mvc.viewbean.SearchStoreItemViewBean


    public List<SearchStoreItemViewBean> buildListViewBeanSearchStoreItem(final RequestData requestData, final StoreResponseBean storeResponseBean) throws Exception {
        final List<SearchStoreItemViewBean> searchStoreItems = new ArrayList<SearchStoreItemViewBean>();
        List<StoreSolr> stores = storeResponseBean.getStoreSolrList();
        for (Iterator<StoreSolr> iterator = stores.iterator(); iterator.hasNext();) {
            StoreSolr storeSolr = (StoreSolr) iterator.next();
            SearchStoreItemViewBean searchItemViewBean = buildViewBeanSearchStoreItem(requestData, storeSolr);
            if(searchItemViewBean != null){
                searchStoreItems.add(searchItemViewBean);
            }
        }
        return searchStoreItems;
View Full Code Here


    public SearchStoreItemViewBean buildViewBeanSearchStoreItem(final RequestData requestData, final StoreSolr storeSolr) throws Exception {

        final String storeCode = storeSolr.getCode();
        final Store store = retailerService.getStoreByCode(storeCode);
       
        final SearchStoreItemViewBean searchItemViewBean = new SearchStoreItemViewBean();
        searchItemViewBean.setName(storeSolr.getName());
        searchItemViewBean.setCode(storeCode);

        searchItemViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.STORE_DETAILS, requestData, store));

        final Asset defaultBackgroundImage = store.getDefaultBackgroundImage();
        if (defaultBackgroundImage != null) {
            final String backgroundImage = engineSettingService.getRetailerOrStoreImageWebPath(defaultBackgroundImage);
            searchItemViewBean.setBackgroundImage(backgroundImage);
        } else {
            searchItemViewBean.setBackgroundImage("");
        }
       
        final Asset defaultIconImage = store.getDefaultThumbnailImage();
        if (defaultIconImage != null) {
            final String iconImage = engineSettingService.getRetailerOrStoreImageWebPath(defaultIconImage);
            searchItemViewBean.setIconImage(iconImage);
        } else {
            searchItemViewBean.setIconImage("");
        }
       
        final Asset carouselImage = store.getDefaultPackshotImage(ImageSize.SMALL.name());
        if (carouselImage != null) {
            final String iconImage = engineSettingService.getRetailerOrStoreImageWebPath(carouselImage);
            searchItemViewBean.setCarouselImage(iconImage);
        } else {
            searchItemViewBean.setIconImage("");
        }

        return searchItemViewBean;
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.mvc.viewbean.SearchStoreItemViewBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.