public class ReportActionUtils
extends java.lang.Object
Utility class that lets us eliminate some case statements elsewhere.
Constructor and Description |
---|
ReportActionUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addFileExtension(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.String |
getContentType(ReportFormat format) |
static java.lang.String |
getFileExtension(ReportFormat format) |
public static byte[] getBytes(RMDocument report, ReportFormat format)
report
- RMDocument of the reportformat
- ReportFormat for desired output format.public static java.lang.String getContentType(ReportFormat format)
public static java.lang.String getFileExtension(ReportFormat format)
public static java.lang.String addFileExtension(java.lang.String filename, ReportFormat format)