private String buildDocumentFullKey(final ScopeDocumentMessage scope, String key) {
   return I18nKeyValueUniverse.DOCUMENT.getPropertyKey()
       + "."
       + scope.getPropertyKey()
       + "."
       + handleKey(key);
 }
  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);
        orderItem.getProductSku().setStocks(null);
        orderItem.getProductSku().setProductMarketing(null);
        orderItem.getProductSku().setRetailers(null);
      }

      final OrderCustomerPojo orderCustomerPojo = orderPojoService.handleOrderMapping(order);

      final String jrxml = getOrderConfirmationTemplateByMarketArea(marketArea);
      File fileJrxml = new File(jrxml);
      final String resourcePath = jrxml.replace(fileJrxml.getName(), "");
      final JasperReport jasperReport = JasperCompileManager.compileReport(jrxml);

      Map<String, Object> parameters = new HashMap<String, Object>();
      parameters.put("RESOURCE_PATH", resourcePath);
      parameters.put("RECORD_DELIMITER", "\r\n");
      parameters.put("order", orderCustomerPojo);
      Object[] orderInformationsParams = {orderCustomerPojo.getOrderNum()};
      parameters.put(
          "orderInformations",
          coreMessageSource.getDocumentMessage(
              ScopeDocumentMessage.ORDER_CONFIRMATION,
              "header_order_informations",
              orderInformationsParams,
              locale));
      parameters.put("date", orderCustomerPojo.getDateUpdate().toString());
      parameters.put("billingAddress", orderCustomerPojo.getBillingAddress());
      parameters.put("shippingAddress", orderCustomerPojo.getShippingAddress());

      Map<String, String> wording =
          coreMessageSource.loadWording(I18nKeyValueUniverse.DOCUMENT.getPropertyKey(), locale);
      parameters.put("wording", wording);

      List<OrderItem> orderItems = new ArrayList<OrderItem>();
      Set<OrderShipment> orderShipments = orderCustomerPojo.getOrderShipments();
      for (Iterator<OrderShipment> iterator = orderShipments.iterator(); iterator.hasNext(); ) {
        OrderShipment orderShipment = (OrderShipment) iterator.next();
        orderItems.addAll(orderShipment.getOrderItems());
      }

      // TODO : denis : one page/table by OrderShipment

      JRDataSource datasource = new JRBeanCollectionDataSource(orderItems, true);

      final JasperPrint jasperPrint =
          JasperFillManager.fillReport(jasperReport, parameters, datasource);

      String fullFilePath = getOrderConfirmationFilePath(order);
      JasperExportManager.exportReportToPdfFile(jasperPrint, fullFilePath);

    } catch (Exception e) {
      logger.error("", e);
    }
  }