Enum VitamHttpHeader

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<VitamHttpHeader>

    public enum VitamHttpHeader
    extends java.lang.Enum<VitamHttpHeader>
    Enum use to represent possible HTTP header for Vitam application. Also define a regular expression to check if values from HTTP headers are right
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      APPLICATION_ID
      The X_APPLICATION_ID header, used in requests to specify external Application Session Id
      CONTEXT_ID
      The CONTEXT_ID header, used in POST and PUT requests to ask for a particular workflow execution context stepBuStep or not
      METHOD_OVERRIDE
      The X-Http-Method-Override header, used in requests to handle unsupported Http methods with body
      OFFER
      The X_OFFER_ID header used in requests to get data from a specific offer
      OFFER_NO_CACHE
      The X_OFFER_NO_CACHE header, used in requests to set cache policy when computing object digest
      OFFERS_IDS
      The X_OFFER_IDS header, used in HEAD requests to give list of offer id
      QUALIFIER
      The X-Qualifier header, used to get an object
      STRATEGY_ID
      The X_STRATEGY_ID header, used in HEAD requests to ask for a particular strategy
      TENANT_ID
      The X_TENANT_ID header, used in requests to specify the used tenant
      VERSION
      The X-Version header, used to get an object
      X_CHUNK_LENGTH
      The X-Content-Length used to have object size (for storage)
      X_CONTENT_DESTINATION
      The X_Destination destination (offerId )
      X_CONTENT_LENGTH
      The X-Content-Length used to have object size (for storage)
      X_CONTENT_SOURCE
      The X_Content source (offerId )
      X_CURSOR
      The X-Cursor
      X_CURSOR_ID
      The X-Cursor-Id
      X_DATA_CATEGORY
      The DataCategory source (offerId )
      X_DIGEST
      The X_DIGEST used to have digest value (for storage)
      X_DIGEST_ALGORITHM
      The X_DIGEST_ALGORITHM used to have digest algrithm (for storage)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static VitamHttpHeader get​(java.lang.String headerName)
      Get VitamHttpHeader from name
      java.lang.String getName()
      Get the header name
      java.lang.String getRegExp()
      Get the regular expression to validate header values
      static VitamHttpHeader valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static VitamHttpHeader[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • STRATEGY_ID

        public static final VitamHttpHeader STRATEGY_ID
        The X_STRATEGY_ID header, used in HEAD requests to ask for a particular strategy
      • OFFER

        public static final VitamHttpHeader OFFER
        The X_OFFER_ID header used in requests to get data from a specific offer
      • OFFERS_IDS

        public static final VitamHttpHeader OFFERS_IDS
        The X_OFFER_IDS header, used in HEAD requests to give list of offer id
      • OFFER_NO_CACHE

        public static final VitamHttpHeader OFFER_NO_CACHE
        The X_OFFER_NO_CACHE header, used in requests to set cache policy when computing object digest
      • TENANT_ID

        public static final VitamHttpHeader TENANT_ID
        The X_TENANT_ID header, used in requests to specify the used tenant
      • APPLICATION_ID

        public static final VitamHttpHeader APPLICATION_ID
        The X_APPLICATION_ID header, used in requests to specify external Application Session Id
      • METHOD_OVERRIDE

        public static final VitamHttpHeader METHOD_OVERRIDE
        The X-Http-Method-Override header, used in requests to handle unsupported Http methods with body
      • QUALIFIER

        public static final VitamHttpHeader QUALIFIER
        The X-Qualifier header, used to get an object
      • VERSION

        public static final VitamHttpHeader VERSION
        The X-Version header, used to get an object
      • X_CHUNK_LENGTH

        public static final VitamHttpHeader X_CHUNK_LENGTH
        The X-Content-Length used to have object size (for storage)
      • X_CONTENT_LENGTH

        public static final VitamHttpHeader X_CONTENT_LENGTH
        The X-Content-Length used to have object size (for storage)
      • X_DIGEST

        public static final VitamHttpHeader X_DIGEST
        The X_DIGEST used to have digest value (for storage)
      • X_DIGEST_ALGORITHM

        public static final VitamHttpHeader X_DIGEST_ALGORITHM
        The X_DIGEST_ALGORITHM used to have digest algrithm (for storage)
      • CONTEXT_ID

        public static final VitamHttpHeader CONTEXT_ID
        The CONTEXT_ID header, used in POST and PUT requests to ask for a particular workflow execution context stepBuStep or not
      • X_CONTENT_SOURCE

        public static final VitamHttpHeader X_CONTENT_SOURCE
        The X_Content source (offerId )
      • X_DATA_CATEGORY

        public static final VitamHttpHeader X_DATA_CATEGORY
        The DataCategory source (offerId )
      • X_CONTENT_DESTINATION

        public static final VitamHttpHeader X_CONTENT_DESTINATION
        The X_Destination destination (offerId )
      • X_CURSOR_ID

        public static final VitamHttpHeader X_CURSOR_ID
        The X-Cursor-Id
    • Method Detail

      • values

        public static VitamHttpHeader[] 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 (VitamHttpHeader c : VitamHttpHeader.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static VitamHttpHeader valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getName

        public java.lang.String getName()
        Get the header name
        Returns:
        the header name
      • getRegExp

        public java.lang.String getRegExp()
        Get the regular expression to validate header values
        Returns:
        the regular expression
      • get

        public static VitamHttpHeader get​(java.lang.String headerName)
        Get VitamHttpHeader from name
        Parameters:
        headerName - the wanted header name
        Returns:
        the header if exists, null otherwise