Class ReportActionUtils
- java.lang.Object
- 
- com.inductiveautomation.reporting.gateway.actions.ReportActionUtils
 
- 
 public class ReportActionUtils extends java.lang.ObjectFilename: ReportActionUtils.java Created on Feb 09, 2015 Author: Kathy Applebaum Copyright Inductive Automation 2015 Project: ReportingUtility class that lets us eliminate some case statements elsewhere. 
- 
- 
Constructor SummaryConstructors Constructor Description ReportActionUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringaddFileExtension(java.lang.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 java.lang.StringgetContentType(ReportFormat format)static java.lang.StringgetFileExtension(ReportFormat format)
 
- 
- 
- 
Method Detail- 
getBytes@Nullable public 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.- 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.
 
 - 
getContentTypepublic static java.lang.String getContentType(ReportFormat format) 
 - 
getFileExtensionpublic static java.lang.String getFileExtension(ReportFormat format) 
 - 
addFileExtensionpublic static java.lang.String addFileExtension(java.lang.String filename, ReportFormat format)
 
- 
 
-