Enum ReportingUtils.ExportType

    • 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 name
        NullPointerException - 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.