Class BirtUtil

java.lang.Object
org.apache.ofbiz.birt.flexible.BirtUtil

public final class BirtUtil extends Object
  • Method Details

    • convertFieldTypeToBirtType

      public static String convertFieldTypeToBirtType(String entityFieldType)
      Return birt field type corresponding to given entity field type
      Parameters:
      entityFieldType -
      Returns:
      birt field type corresponding to given entity field type
    • convertFieldTypeToBirtParameterType

      public static String convertFieldTypeToBirtParameterType(String entityFieldType)
      Return birt parameter type corresponding to given entity field type
      Parameters:
      entityFieldType -
      Returns:
      birt parameter type corresponding to given entity field type
    • isSupportedMimeType

      public static boolean isSupportedMimeType(String contentType)
      Return true if mime type related to a contentType is supported by Birt
      Parameters:
      contentType -
      Returns:
      true if mime type related to a contentType is supported by Birt
    • getMimeTypeOutputFormat

      public static String getMimeTypeOutputFormat(String contentType) throws GeneralException
      Return mime type related to a contentType supported by Birt
      Parameters:
      contentType -
      Returns:
      mime type related to a contentType supported by Birt
      Throws:
      GeneralException
    • getMimeTypeFileExtension

      public static String getMimeTypeFileExtension(String contentType) throws GeneralException
      Parameters:
      contentType - return extension file related to a contentType supported by Birt
      Throws:
      GeneralException
    • resolveTemplatePathLocation

      public static String resolveTemplatePathLocation()
      Resolve the template path location where rptDesign file are stored, first try the resolution from content.properties content.upload.path.prefix second from birt.properties with rptDesign.output.path and add birtReptDesign directory default OFBIZ_HOME/runtime/uploads/birtRptDesign/ Note: the Birt.properties file does not exist OOTB but can be added for convenience. like using the location where you edit with the Birt Report Designer...
      Returns:
      template path location where rptDesign file is stored
    • resolveRptDesignFilePathFromContent

      public static String resolveRptDesignFilePathFromContent(Delegator delegator, String contentId) throws GenericEntityException
      With the reporting contentId element resolve the path to rptDesign linked
      Parameters:
      delegator -
      contentId -
      Returns:
      path to rptDesign file
      Throws:
      GenericEntityException
    • encodeReportName

      public static String encodeReportName(String reportName)
      remove all non unicode alphanumeric and replace space by _
      Parameters:
      reportName -
      Returns:
      spaces replaced by underscore