コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }