Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.Localization


    /**
     *
     */
    public SearchProductItemViewBean buildViewBeanSearchProductItem(final RequestData requestData, final ProductMarketingSolr productMarketingSolr) throws Exception {
        final Localization localization = requestData.getMarketAreaLocalization();
        final String localeCode = localization.getCode();

        final String productCode = productMarketingSolr.getCode();
        final ProductMarketing productMarketing = productService.getProductMarketingByCode(productCode);
        final ProductSku productSku = productService.getProductSkuByCode(productMarketing.getDefaultProductSku().getCode());
        final String productSkuName = productSku.getI18nName(localeCode);
View Full Code Here


    /**
     *
     */
    public SearchFacetViewBean buildViewBeanCatalogSearchFacet(final RequestData requestData, final FacetField facetField) throws Exception {
        final SearchFacetViewBean searchFacetViewBean = new SearchFacetViewBean();
        final Localization localization = requestData.getMarketAreaLocalization();
        final String localeCode = localization.getCode();
       
        if(ProductMarketingResponseBean.PRODUCT_MARKETING_DEFAULT_FACET_FIELD.equalsIgnoreCase(facetField.getName())){
          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
View Full Code Here

        return productBrandViewBeans;
    }
   
    public List<RecentProductViewBean> buildListViewBeanRecentProduct(final RequestData requestData, final List<String> listProductSkuCodes, FetchPlan categoryVirtualFetchPlans, FetchPlan productMarketingFetchPlans, FetchPlan productSkuFetchPlans) throws Exception {
      final List<RecentProductViewBean> recentProductViewBeans = new ArrayList<RecentProductViewBean>();
      final Localization localization = requestData.getMarketAreaLocalization();
        final String localeCode = localization.getCode();
      for (String productSkuCode : listProductSkuCodes) {
        RecentProductViewBean recentProductViewBean = new RecentProductViewBean();
            final ProductSku reloadedProductSku = productService.getProductSkuByCode(productSkuCode, productSkuFetchPlans);
            final ProductMarketing productMarketing = productService.getProductMarketingByCode(reloadedProductSku.getProductMarketing().getCode(), productMarketingFetchPlans);
            final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getDefaultVirtualCatalogCategoryByProductSkuId(reloadedProductSku.getId(), categoryVirtualFetchPlans);
View Full Code Here

   
    /**
     *
     */
    public CatalogBreadcrumbViewBean buildViewBeanCatalogBreadcrumb(final RequestData requestData, final CatalogCategoryVirtual catalogCategory) throws Exception {
       final Localization localization =  requestData.getMarketAreaLocalization();
       final String localizationCode = localization.getCode();
       final CatalogBreadcrumbViewBean catalogBreadCumViewBean = new CatalogBreadcrumbViewBean();
       catalogBreadCumViewBean.setRoot(catalogCategory.isRoot());
       catalogBreadCumViewBean.setCode(catalogCategory.getCode());
         catalogBreadCumViewBean.setName(catalogCategory.getI18nName(localizationCode));
   
View Full Code Here

    public List<LocalizationViewBean> buildListViewBeanLocalizationByMarketArea(final RequestData requestData, final List<Localization> localizations) throws Exception {
        final List<LocalizationViewBean> localizationViewBeans = new ArrayList<LocalizationViewBean>();
        if (localizations != null) {
            for (Iterator<Localization> iterator = localizations.iterator(); iterator.hasNext();) {
                Localization localization = (Localization) iterator.next();
                localizationViewBeans.add(buildViewBeanLocalizationByMarketArea(requestData, localization));
            }
        }
        return localizationViewBeans;
    }
View Full Code Here

    public List<LocalizationViewBean> buildListViewBeanLocalization(final RequestData requestData, final List<Localization> localizations) throws Exception {
        final List<LocalizationViewBean> localizationViewBeans = new ArrayList<LocalizationViewBean>();
        if (localizations != null) {
            for (Iterator<Localization> iterator = localizations.iterator(); iterator.hasNext();) {
                Localization localization = (Localization) iterator.next();
                localizationViewBeans.add(buildViewBeanLocalization(requestData, localization));
            }
        }
        return localizationViewBeans;
    }
View Full Code Here

    /**
     * @throws Exception
     *
     */
    public LegalTermsViewBean buildViewBeanLegalTerms(final RequestData requestData) throws Exception {
        final Localization localization = requestData.getMarketAreaLocalization();
        final Locale locale = localization.getLocale();

        final LegalTermsViewBean legalTerms = new LegalTermsViewBean();

        legalTerms.setWarning(getCommonMessage(ScopeCommonMessage.LEGAL_TERMS, "warning", locale));
        legalTerms.setCopyright(getCommonMessage(ScopeCommonMessage.LEGAL_TERMS, "copyright", locale));
View Full Code Here

   *
   */
  @Override
  public List<MenuViewBean> buildListViewBeanMenu(final RequestData requestData) throws Exception {
    final HttpServletRequest request = requestData.getRequest();
    final Localization localization = requestData.getMarketAreaLocalization();
    final Locale locale = localization.getLocale();
    final String currentUrl = requestUtil.getCurrentRequestUrl(request);
   
    final List<MenuViewBean> menuViewBeans = new ArrayList<MenuViewBean>();
   
    MenuViewBean menu = new MenuViewBean();
View Full Code Here

 
  public String buildChangeLanguageUrl(final RequestData requestData) throws Exception {
    final MarketPlace marketPlace = requestData.getMarketPlace();
    final Market market = requestData.getMarket();
    final MarketArea marketArea = requestData.getMarketArea();
    final Localization localization = requestData.getMarketAreaLocalization();
    final Retailer retailer = requestData.getMarketAreaRetailer();
   
    String url = buildDefaultPrefix(requestData) + BoUrls.CHANGE_LANGUAGE.getUrlWithoutWildcard() + "?";
    url = url + RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE + "=" + handleParamValue(marketPlace.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_CODE + "=" + handleParamValue(market.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE + "=" + handleParamValue(marketArea.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_RETAILER_CODE + "=" + handleParamValue(retailer.getCode());
        url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_LANGUAGE + "=" + handleParamValue(localization.getCode());
    return url;
  }
View Full Code Here

 
  public String buildChangeContextUrl(final RequestData requestData) throws Exception {
    final MarketPlace marketPlace = requestData.getMarketPlace();
    final Market market = requestData.getMarket();
    final MarketArea marketArea = requestData.getMarketArea();
    final Localization localization = requestData.getMarketAreaLocalization();
    final Retailer retailer = requestData.getMarketAreaRetailer();
   
    String url = buildDefaultPrefix(requestData) + BoUrls.CHANGE_CONTEXT.getUrlWithoutWildcard() + "?";
    url = url + RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE + "=" + handleParamValue(marketPlace.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_CODE + "=" + handleParamValue(market.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE + "=" + handleParamValue(marketArea.getCode());
    url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_RETAILER_CODE + "=" + handleParamValue(retailer.getCode());
        url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_LANGUAGE + "=" + handleParamValue(localization.getCode());
    return url;
  }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.Localization

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.