Package org.apache.ofbiz.birt.flexible
Class BirtUtil
java.lang.Object
org.apache.ofbiz.birt.flexible.BirtUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertFieldTypeToBirtParameterType
(String entityFieldType) Return birt parameter type corresponding to given entity field typestatic String
convertFieldTypeToBirtType
(String entityFieldType) Return birt field type corresponding to given entity field typestatic String
encodeReportName
(String reportName) remove all non unicode alphanumeric and replace space by _static String
getMimeTypeFileExtension
(String contentType) static String
getMimeTypeOutputFormat
(String contentType) Return mime type related to a contentType supported by Birtstatic boolean
isSupportedMimeType
(String contentType) Return true if mime type related to a contentType is supported by Birtstatic String
resolveRptDesignFilePathFromContent
(Delegator delegator, String contentId) With the reporting contentId element resolve the path to rptDesign linkedstatic String
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 Details
-
convertFieldTypeToBirtType
Return birt field type corresponding to given entity field type- Parameters:
entityFieldType
-- Returns:
- birt field type corresponding to given entity field type
-
convertFieldTypeToBirtParameterType
Return birt parameter type corresponding to given entity field type- Parameters:
entityFieldType
-- Returns:
- birt parameter type corresponding to given entity field type
-
isSupportedMimeType
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
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
- Parameters:
contentType
- return extension file related to a contentType supported by Birt- Throws:
GeneralException
-
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
remove all non unicode alphanumeric and replace space by _- Parameters:
reportName
-- Returns:
- spaces replaced by underscore
-