Class ReportActionUtils
java.lang.Object
com.inductiveautomation.reporting.gateway.actions.ReportActionUtils
Filename: ReportActionUtils.java
 Created on Feb 09, 2015
 Author: Kathy Applebaum
 Copyright Inductive Automation 2015
 Project: Reporting
 
Utility class that lets us eliminate some case statements elsewhere.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringaddFileExtension(String filename, ReportFormat format) static byte[]getBytes(RMDocument report, ReportFormat format) Convenience method to get the bytes of a report in the correct format without duplicating a switch statement throughout the code.static StringgetContentType(ReportFormat format) static StringgetFileExtension(ReportFormat format) 
- 
Constructor Details- 
ReportActionUtilspublic ReportActionUtils()
 
- 
- 
Method Details- 
getBytesConvenience method to get the bytes of a report in the correct format without duplicating a switch statement throughout the code.- Parameters:
- report- RMDocument of the report
- format- ReportFormat for desired output format.
- Returns:
- byte[] of the generated report in the desired format or null if invalid format.
 
- 
getContentType
- 
getFileExtension
- 
addFileExtension
 
-