Class CommonMediaType

java.lang.Object
javax.ws.rs.core.MediaType
fr.gouv.vitam.common.CommonMediaType

public class CommonMediaType extends javax.ws.rs.core.MediaType
CommonMediaType contains a different archive mime type supported by Vitam
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A String constant representing "application/x-bzip2" media type.
    static final javax.ws.rs.core.MediaType
    A MediaType constant representing "application/x-bzip2" media type.
    static final String
    A String constant representing "application/x-gzip" media type.
    static final javax.ws.rs.core.MediaType
    A MediaType constant representing "application/gzip" media type.
    static final String
    A String constant representing "application/x-tar" media type.
    static final javax.ws.rs.core.MediaType
    A MediaType constant representing "application/x-tar" media type.
    static final String
     
    static final javax.ws.rs.core.MediaType
     
    static final String
    A String constant representing "application/x-gzip" media type.
    static final javax.ws.rs.core.MediaType
    A MediaType constant representing "application/x-gzip" media type.
    static final String
    A String constant representing "application/zip" media type.
    static final javax.ws.rs.core.MediaType
    A MediaType constant representing "application/zip" media type.

    Fields inherited from class javax.ws.rs.core.MediaType

    APPLICATION_ATOM_XML, APPLICATION_ATOM_XML_TYPE, APPLICATION_FORM_URLENCODED, APPLICATION_FORM_URLENCODED_TYPE, APPLICATION_JSON, APPLICATION_JSON_PATCH_JSON, APPLICATION_JSON_PATCH_JSON_TYPE, APPLICATION_JSON_TYPE, APPLICATION_OCTET_STREAM, APPLICATION_OCTET_STREAM_TYPE, APPLICATION_SVG_XML, APPLICATION_SVG_XML_TYPE, APPLICATION_XHTML_XML, APPLICATION_XHTML_XML_TYPE, APPLICATION_XML, APPLICATION_XML_TYPE, CHARSET_PARAMETER, MEDIA_TYPE_WILDCARD, MULTIPART_FORM_DATA, MULTIPART_FORM_DATA_TYPE, SERVER_SENT_EVENTS, SERVER_SENT_EVENTS_TYPE, TEXT_HTML, TEXT_HTML_TYPE, TEXT_PLAIN, TEXT_PLAIN_TYPE, TEXT_XML, TEXT_XML_TYPE, WILDCARD, WILDCARD_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks archive type if is supported by Vitam.
    static String
    mimeTypeOf(javax.ws.rs.core.MediaType mediaType)
    Creates mime type code String of Media type.
    static javax.ws.rs.core.MediaType
    valueOf(String archivetype)
    Creates an instance of MediaType by the supplied string.

    Methods inherited from class javax.ws.rs.core.MediaType

    equals, getParameters, getSubtype, getType, hashCode, isCompatible, isWildcardSubtype, isWildcardType, toString, withCharset

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ZIP

      public static final String ZIP
      A String constant representing "application/zip" media type.
      See Also:
    • ZIP_TYPE

      public static final javax.ws.rs.core.MediaType ZIP_TYPE
      A MediaType constant representing "application/zip" media type.
    • TAR

      public static final String TAR
      A String constant representing "application/x-tar" media type.
      See Also:
    • TAR_TYPE

      public static final javax.ws.rs.core.MediaType TAR_TYPE
      A MediaType constant representing "application/x-tar" media type.
    • XGZIP

      public static final String XGZIP
      A String constant representing "application/x-gzip" media type.
      See Also:
    • XGZIP_TYPE

      public static final javax.ws.rs.core.MediaType XGZIP_TYPE
      A MediaType constant representing "application/x-gzip" media type.
    • GZIP

      public static final String GZIP
      A String constant representing "application/x-gzip" media type.
      See Also:
    • GZIP_TYPE

      public static final javax.ws.rs.core.MediaType GZIP_TYPE
      A MediaType constant representing "application/gzip" media type.
    • BZIP2

      public static final String BZIP2
      A String constant representing "application/x-bzip2" media type.
      See Also:
    • BZIP2_TYPE

      public static final javax.ws.rs.core.MediaType BZIP2_TYPE
      A MediaType constant representing "application/x-bzip2" media type.
    • TEXT_CSV

      public static final String TEXT_CSV
      See Also:
    • TEXT_CSV_MEDIATYPE

      public static final javax.ws.rs.core.MediaType TEXT_CSV_MEDIATYPE
  • Constructor Details

    • CommonMediaType

      public CommonMediaType()
  • Method Details

    • valueOf

      public static javax.ws.rs.core.MediaType valueOf(String archivetype)
      Creates an instance of MediaType by the supplied string.
      Parameters:
      archivetype - the media type string.
      Returns:
      the MediaType.
      Throws:
      IllegalArgumentException - if the supplied string cannot be supported or is null.
    • mimeTypeOf

      public static String mimeTypeOf(javax.ws.rs.core.MediaType mediaType)
      Creates mime type code String of Media type.
      Parameters:
      mediaType - MediaType
      Returns:
      A String constant representing media type
    • isSupportedFormat

      public static boolean isSupportedFormat(String mimeType)
      Checks archive type if is supported by Vitam.
      Parameters:
      mimeType - the mime type to check
      Returns:
      boolean : true if archive type supported by Vitam.
      Since:
      0.10.0