Enum Class DocumentType

java.lang.Object
java.lang.Enum<DocumentType>
se.idsec.signservice.integration.document.DocumentType
All Implemented Interfaces:
Serializable, Comparable<DocumentType>, Constable

public enum DocumentType extends Enum<DocumentType>
Representation of document types (documents for signing).
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Enum Constant Details

  • Method Details

    • values

      public static DocumentType[] 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 DocumentType 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
    • getMimeType

      public String getMimeType()
      Returns the MIME type for the document type.
      Returns:
      the MIME type
    • fromMimeType

      public static DocumentType fromMimeType(String mimeType) throws IllegalArgumentException
      Given a MIME type the method returns the corresponding enum constant.
      Parameters:
      mimeType - the MIME type
      Returns:
      the enum constant value
      Throws:
      IllegalArgumentException - if no matching enum constant is found