Class BirtUtil


  • public final class BirtUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertFieldTypeToBirtParameterType​(java.lang.String entityFieldType)
      Return birt parameter type corresponding to given entity field type
      static java.lang.String convertFieldTypeToBirtType​(java.lang.String entityFieldType)
      Return birt field type corresponding to given entity field type
      static java.lang.String encodeReportName​(java.lang.String reportName)
      remove all non unicode alphanumeric and replace space by _
      static java.lang.String getMimeTypeFileExtension​(java.lang.String contentType)  
      static java.lang.String getMimeTypeOutputFormat​(java.lang.String contentType)
      Return mime type related to a contentType supported by Birt
      static boolean isSupportedMimeType​(java.lang.String contentType)
      Return true if mime type related to a contentType is supported by Birt
      static java.lang.String resolveRptDesignFilePathFromContent​(Delegator delegator, java.lang.String contentId)
      With the reporting contentId element resolve the path to rptDesign linked
      static java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • convertFieldTypeToBirtType

        public static java.lang.String convertFieldTypeToBirtType​(java.lang.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 java.lang.String convertFieldTypeToBirtParameterType​(java.lang.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​(java.lang.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 java.lang.String getMimeTypeOutputFormat​(java.lang.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 java.lang.String getMimeTypeFileExtension​(java.lang.String contentType)
                                                         throws GeneralException
        Parameters:
        contentType - return extension file related to a contentType supported by Birt
        Throws:
        GeneralException
      • resolveTemplatePathLocation

        public static java.lang.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 java.lang.String resolveRptDesignFilePathFromContent​(Delegator delegator,
                                                                           java.lang.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 java.lang.String encodeReportName​(java.lang.String reportName)
        remove all non unicode alphanumeric and replace space by _
        Parameters:
        reportName -
        Returns:
        spaces replaced by underscore