private String buildFilePathSegment(final OrderCustomer order) {
   final EngineSetting documentFileRootPathEngineSetting =
       engineSettingService.getDocumentFileRootPath();
   String documentFileRootPath = documentFileRootPathEngineSetting.getDefaultValue();
   String filePathSegment = documentFileRootPath + "/" + order.getPrefixHashFolder() + "/";
   File file = new File(filePathSegment);
   if (!file.exists()) {
     file.mkdirs();
   }
   return filePathSegment;
 }
 public String getOrderConfirmationWebPath(final OrderCustomer order) {
   final String documentWebRootPath = buildWebPathSegment(order);
   final String fullPath =
       documentWebRootPath
           + "/"
           + order.getPrefixHashFolder()
           + "/"
           + OrderDocumentType.ORDER_CONFIRMATION.getPropertyKey()
           + "-"
           + order.getOrderNum()
           + ".pdf";
   return fullPath;
 }
 public String getInvoiceWebPath(final OrderCustomer order) {
   final String documentWebRootPath = buildWebPathSegment(order);
   final String fullPath =
       documentWebRootPath
           + "/"
           + order.getPrefixHashFolder()
           + "/"
           + OrderDocumentType.INVOICE.getPropertyKey()
           + "-"
           + order.getOrderNum()
           + ".pdf";
   return fullPath;
 }