Package fr.gouv.vitam.common.server

# Class HeaderIdHelper

java.lang.Object
fr.gouv.vitam.common.server.HeaderIdHelper

public class HeaderIdHelper extends Object
HeaderId Helper, check and put header values

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `HeaderIdHelper.Context`
  Context of request

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getHeaderString(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, String headerName)`
  `static void`
  `putVitamIdFromExternalHeaderInSession(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, HeaderIdHelper.Context ctx)`
  Extracts the vitam id from the headers to save it through the VitamSession
  `static void`
  `putVitamIdFromHeaderInSession(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, HeaderIdHelper.Context ctx)`
  Extracts the vitam id from the headers to save it through the VitamSession
  `static void`
  `putVitamIdFromSessionInExternalHeader(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, HeaderIdHelper.Context ctx, int statusCode)`
  Retrieves the vitam id from the VitamSession and add a X-TENANT-ID header
  `static void`
  `putVitamIdFromSessionInHeader(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, HeaderIdHelper.Context ctx, int statusCode)`
  Retrieves the vitam id from the VitamSession and add a X-TENANT-ID header

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### putVitamIdFromExternalHeaderInSession

    public static void putVitamIdFromExternalHeaderInSession(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, HeaderIdHelper.Context ctx)
    Extracts the vitam id from the headers to save it through the VitamSession
    Parameters:
      `requestHeaders` - Complete list of HTTP message headers ; will not be changed.
      `ctx` - Context, or rather http message type (request or response)

  - ### putVitamIdFromHeaderInSession

    public static void putVitamIdFromHeaderInSession(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, HeaderIdHelper.Context ctx)
    Extracts the vitam id from the headers to save it through the VitamSession
    Parameters:
      `requestHeaders` - Complete list of HTTP message headers ; will not be changed.
      `ctx` - Context, or rather http message type (request or response)

  - ### getHeaderString

    public static String getHeaderString(jakarta.ws.rs.core.MultivaluedMap<String,String> requestHeaders, String headerName)

  - ### putVitamIdFromSessionInExternalHeader

    public static void putVitamIdFromSessionInExternalHeader(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, HeaderIdHelper.Context ctx, int statusCode)
    Retrieves the vitam id from the VitamSession and add a X-TENANT-ID header
    Parameters:
      `headers` - List of target HTTP headers ; required header will be added to this list.
      `ctx` - Context, or rather http message type (request or response)
      `statusCode` - the status code

  - ### putVitamIdFromSessionInHeader

    public static void putVitamIdFromSessionInHeader(jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, HeaderIdHelper.Context ctx, int statusCode)
    Retrieves the vitam id from the VitamSession and add a X-TENANT-ID header
    Parameters:
      `headers` - List of target HTTP headers ; required header will be added to this list.
      `ctx` - Context, or rather http message type (request or response)
      `statusCode` - status code