Enum Class ResponseFileType

java.lang.Object
java.lang.Enum<ResponseFileType>
com.ubs.backend.classes.enums.ResponseFileType
All Implemented Interfaces:
Serializable, Comparable<ResponseFileType>, Constable

public enum ResponseFileType extends Enum<ResponseFileType>
Enum to specify which file types should be allowed on a File Upload
Since:
17.07.2021
Author:
Marc Andri Fuchs
  • Enum Constant Details

    • IMAGE_PNG

      public static final ResponseFileType IMAGE_PNG
      .PNG Files
      Since:
      17.07.2021
    • IMAGE_JPEG

      public static final ResponseFileType IMAGE_JPEG
      .JPG/.JPEG Files
      Since:
      17.07.2021
    • IMAGE_GIF

      public static final ResponseFileType IMAGE_GIF
      .GIF Files
      Since:
      17.07.2021
    • APPLICATION_PDF

      public static final ResponseFileType APPLICATION_PDF
      .PDF Files
      Since:
      17.07.2021
    • TEXT_PLAIN

      public static final ResponseFileType TEXT_PLAIN
      .TXT Files
      Since:
      17.07.2021
    • EXCEL_2007

      public static final ResponseFileType EXCEL_2007
      .XLSX Files (Excel 2007)
      Since:
      17.07.2021
    • EXCEL_1997

      public static final ResponseFileType EXCEL_1997
      .XLS Files (Excel 1997)
      Since:
      17.07.2021
    • WORD_2007

      public static final ResponseFileType WORD_2007
      .DOCX Files (Word 2007)
      Since:
      17.07.2021
    • WORD_2003

      public static final ResponseFileType WORD_2003
      .DOC Files (Word 2003)
      Since:
      17.07.2021
    • POWERPOINT_2007

      public static final ResponseFileType POWERPOINT_2007
      .PPTX Files (PowerPoint 2007)
      Since:
      17.07.2021
    • POWERPOINT_2004

      public static final ResponseFileType POWERPOINT_2004
      .PPT Files (PowerPoint 2004)
      Since:
      17.07.2021
  • Field Details

    • mimeType

      private final String mimeType
      The MimeType of the FileType
      Since:
      17.07.2021
    • extension

      private final String extension
      The FileExtension of the File
      Since:
      17.07.2021
  • Constructor Details

    • ResponseFileType

      private ResponseFileType(String mimeType, String extension)
      Default Constructor
      Parameters:
      mimeType - The MimeType for the FileType
      extension - The FileExtension of the File
      Since:
      17.07.2021
  • Method Details

    • values

      public static ResponseFileType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ResponseFileType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getByMimeType

      public static ResponseFileType getByMimeType(String mimeType)
      Parameters:
      mimeType -
      Returns:
      Since:
      17.07.2021
    • getMimeType

      public String getMimeType()
      Returns:
      The MimeType of the FileType
      Since:
      17.07.2021
    • getExtension

      public String getExtension()
      Returns:
      The FileExtension of the File
      Since:
      17.07.2021