Package org.apache.ofbiz.birt.flexible
Class BirtUtil
- java.lang.Object
-
- org.apache.ofbiz.birt.flexible.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 typestatic java.lang.String
convertFieldTypeToBirtType(java.lang.String entityFieldType)
Return birt field type corresponding to given entity field typestatic 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 Birtstatic boolean
isSupportedMimeType(java.lang.String contentType)
Return true if mime type related to a contentType is supported by Birtstatic java.lang.String
resolveRptDesignFilePathFromContent(Delegator delegator, java.lang.String contentId)
With the reporting contentId element resolve the path to rptDesign linkedstatic 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.
-
-
-
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
-
-