Class AttachmentResourceLoader

java.lang.Object
org.adempiere.report.jasper.AttachmentResourceLoader

public class AttachmentResourceLoader extends Object
Load report resources from attachment to process
Author:
hengsin
  • Constructor Details

    • AttachmentResourceLoader

      public AttachmentResourceLoader(String destinationFolder)
      Parameters:
      destinationFolder -
  • Method Details

    • getReportFile

      public File getReportFile(ProcessInfo processInfo, String reportPath)
      Get report file from process attachment
      Parameters:
      reportPath - must of syntax attachment:filename
      Returns:
      File
    • getResourceBundle

      public File getResourceBundle(String bundleName, Language currLang)
      Get property resource file from process attachment
      Parameters:
      bundleName -
      currLang -
      Returns:
      File
    • getSubreports

      public File[] getSubreports(String reportPath)
      Get subreports and other resources (for e.g images) from attachment. Assume all other jasper attachment is subreport.
      Parameters:
      reportPath -
      Returns:
      File[] of subreports
    • isAttachmentResourcePath

      public static boolean isAttachmentResourcePath(String path)
      Parameters:
      path -
      Returns:
      true if path starts with "attachment:"