Package org.hoteia.qalingo.core.domain

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


        engineEcoSession = (EngineEcoSession) setSessionMarketArea(engineEcoSession, marketArea);

        // DEFAULT LOCALE IS FROM THE REQUEST OR FROM THE MARKET AREA
        marketArea = engineEcoSession.getCurrentMarketArea();
        final String requestLocale = request.getLocale().toString();
        Localization localization = marketArea.getDefaultLocalization();
        if (marketArea.getLocalization(requestLocale) != null) {
            localization = marketArea.getLocalization(requestLocale);
        } else {
            if (requestLocale.length() > 2) {
                String localeLanguage = request.getLocale().getLanguage();
View Full Code Here


    }
   
    public void generateOrderConfirmation(final OrderCustomer order) {
        try {
            final MarketArea marketArea = marketService.getMarketAreaById(order.getMarketAreaId());
            final Localization localization = localizationService.getLocalizationById(order.getLocalizationId());
            final Locale locale = localization.getLocale();
           
            // WE SET TO NULL USELESS DATA - BETTER WAY SHOULD BE TO USE A SPECIFIC DOZER RULE
            for (Iterator<OrderItem> iterator = order.getOrderItems().iterator(); iterator.hasNext();) {
                OrderItem orderItem = (OrderItem) iterator.next();
                orderItem.getProductSku().setPrices(null);
View Full Code Here

    }
   
    public void generateShippingConfirmation(final OrderCustomer order) {
        try {
            final MarketArea marketArea = marketService.getMarketAreaById(order.getMarketAreaId());
            final Localization localization = localizationService.getLocalizationById(order.getLocalizationId());
            final Locale locale = localization.getLocale();
           
            // WE SET TO NULL USELESS DATA - BETTER WAY SHOULD BE TO USE A SPECIFIC DOZER RULE
            for (Iterator<OrderItem> iterator = order.getOrderItems().iterator(); iterator.hasNext();) {
                OrderItem orderItem = (OrderItem) iterator.next();
                orderItem.getProductSku().setPrices(null);
View Full Code Here

    }
   
    public void generateInvoice(final OrderCustomer order) {
        try {
            final MarketArea marketArea = marketService.getMarketAreaById(order.getMarketAreaId());
            final Localization localization = localizationService.getLocalizationById(order.getLocalizationId());
            final Locale locale = localization.getLocale();
           
            // WE SET TO NULL USELESS DATA - BETTER WAY SHOULD BE TO USE A SPECIFIC DOZER RULE
            for (Iterator<OrderItem> iterator = order.getOrderItems().iterator(); iterator.hasNext();) {
                OrderItem orderItem = (OrderItem) iterator.next();
                orderItem.getProductSku().setPrices(null);
View Full Code Here

        final CommonViewBean commonViewBean = new CommonViewBean();

        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();
        final CurrencyReferential currency = requestData.getMarketAreaCurrency();

        // NO CACHE FOR THIS PART
View Full Code Here

           
            // TODO : why : SET A RELOAD OBJECT MARKET -> event
            // LazyInitializationException: could not initialize proxy - no Session
            final Market reloadedMarket = marketService.getMarketById(marketPlaceNavigation.getDefaultMarket().getId().toString());
            final MarketArea defaultMarketArea = marketService.getMarketAreaByCode(reloadedMarket.getDefaultMarketArea().getCode());
            final Localization defaultLocalization = defaultMarketArea.getDefaultLocalization();
            final Retailer defaultRetailer = defaultMarketArea.getDefaultRetailer();
           
            RequestData requestDataForThisMarketPlace = new RequestData();
            BeanUtils.copyProperties(requestData, requestDataForThisMarketPlace);
            requestDataForThisMarketPlace.setMarketPlace(marketPlaceNavigation);
View Full Code Here

            final Market marketNavigationReloaded = marketService.getMarketById(marketNavigation.getId().toString());
           
            if(marketNavigationReloaded.getDefaultMarketArea() != null){
                // RELOAD THE MARKET TO KEEP AN ENTITY WITH RIGHT FETCHS
                final MarketArea defaultMarketArea = marketService.getMarketAreaByCode(marketNavigationReloaded.getDefaultMarketArea().getCode());
                final Localization defaultLocalization = defaultMarketArea.getDefaultLocalization();
                final Retailer defaultRetailer = defaultMarketArea.getDefaultRetailer();

                RequestData requestDataForThisMarket = new RequestData();
                BeanUtils.copyProperties(requestData, requestDataForThisMarket);
                requestDataForThisMarket.setMarket(marketNavigationReloaded);
View Full Code Here

                final Market reloadedMarket = marketService.getMarketByCode(marketArea.getMarket().getCode());
                // RELOAD THE MARKETPLACE TO KEEP AN ENTITY WITH RIGHT FETCHS
                final MarketPlace reloadedMarketPlace = marketService.getMarketPlaceByCode(reloadedMarket.getMarketPlace().getCode());
               
                final MarketArea reloadedMarketArea = marketService.getMarketAreaByCode(marketArea.getCode());
                final Localization defaultLocalization = reloadedMarketArea.getDefaultLocalization();
                final Retailer defaultRetailer = reloadedMarketArea.getDefaultRetailer();
                final CurrencyReferential defaultCurrency = reloadedMarketArea.getDefaultCurrency();

                RequestData requestDataForThisMarketArea = new RequestData();
                BeanUtils.copyProperties(requestData, requestDataForThisMarketArea);
View Full Code Here

    public List<LocalizationViewBean> buildListViewBeanLocalizationByMarketArea(final RequestData requestData, final Localization currentLocalization) throws Exception {
        final MarketArea marketArea = requestData.getMarketArea();
        final List<Localization> translationAvailables = new ArrayList<Localization>(marketArea.getLocalizations());
        List<LocalizationViewBean> localizationViewBeans = new ArrayList<LocalizationViewBean>();
        for (Iterator<Localization> iterator = translationAvailables.iterator(); iterator.hasNext();) {
            final Localization localizationAvailable = (Localization) iterator.next();
            localizationViewBeans.add(buildViewBeanLocalization(requestData, localizationAvailable));
        }
        for (Iterator<LocalizationViewBean> iterator = localizationViewBeans.iterator(); iterator.hasNext();) {
            final LocalizationViewBean localizationViewBean = (LocalizationViewBean) iterator.next();
            localizationViewBean.setActive(false);
View Full Code Here

     *
     */
    public RetailerViewBean buildViewBeanRetailer(final RequestData requestData, final Retailer retailer) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        final MarketArea marketArea = requestData.getMarketArea();
        final Localization localization = requestData.getMarketAreaLocalization();
        final String localizationCodeNavigation = localization.getCode();
        final Locale locale = requestData.getLocale();

        final RetailerViewBean retailerViewBean = new RetailerViewBean();

        retailerViewBean.setCode(retailer.getCode());
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.