Enum ReportingUtils.ExportType
- java.lang.Object
-
- java.lang.Enum<ReportingUtils.ExportType>
-
- org.openbravo.client.application.report.ReportingUtils.ExportType
-
- All Implemented Interfaces:
Serializable
,Comparable<ReportingUtils.ExportType>
- Enclosing class:
- ReportingUtils
public static enum ReportingUtils.ExportType extends Enum<ReportingUtils.ExportType>
enum with the supported Export Outputs. Includes custom properties to be used when the report is generated.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
Map<String,Object>
getExportParameters()
static ReportingUtils.ExportType
getExportType(String action)
Returns the corresponding ExportType item based on the action.String
getExtension()
boolean
hasExtension(String fileExtension)
Checks if the extension of the the ExportType is the same as the one passed as parameter.boolean
isValidTemporaryFileName(String tmpFileName)
Checks if temporary file name is a valid one: has extension and the name is a uuid.static ReportingUtils.ExportType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ReportingUtils.ExportType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CSV
public static final ReportingUtils.ExportType CSV
CSV export type
-
HTML
public static final ReportingUtils.ExportType HTML
HTML export type
-
PDF
public static final ReportingUtils.ExportType PDF
PDF export type
-
TXT
public static final ReportingUtils.ExportType TXT
TXT export type
-
XLS
public static final ReportingUtils.ExportType XLS
XLS export type
-
XLSX
public static final ReportingUtils.ExportType XLSX
XLSX export type
-
XML
public static final ReportingUtils.ExportType XML
XML export type
-
-
Method Detail
-
values
public static ReportingUtils.ExportType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ReportingUtils.ExportType c : ReportingUtils.ExportType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReportingUtils.ExportType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getExtension
public String getExtension()
- Returns:
- a String with the extension type.
-
getContentType
public String getContentType()
- Returns:
- a String with the content type.
-
getExportParameters
public Map<String,Object> getExportParameters()
- Returns:
- a map with the configuration parameters.
-
getExportType
public static ReportingUtils.ExportType getExportType(String action) throws OBException
Returns the corresponding ExportType item based on the action. This method is case-insensitive.- Parameters:
action
- a String that defines the export type.- Returns:
- the ExportType associated to the input String parameter.
- Throws:
OBException
- In case the input String parameter does not correspond with any valid ExportType, an exception is thrown with the error message.
-
hasExtension
public boolean hasExtension(String fileExtension)
Checks if the extension of the the ExportType is the same as the one passed as parameter. This method is case-insensitive.- Parameters:
fileExtension
- a String containing a file extension name.- Returns:
- true if the extension of the ExportType is the same as the one passed as parameter, false otherwise.
-
isValidTemporaryFileName
public boolean isValidTemporaryFileName(String tmpFileName)
Checks if temporary file name is a valid one: has extension and the name is a uuid.- Parameters:
tmpFileName
- a String with the file name.- Returns:
- true if the the temporary file name is valid, false otherwise.
-
-