Class HeaderIdHelper

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

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

    • putVitamIdFromExternalHeaderInSession

      public static void putVitamIdFromExternalHeaderInSession(javax.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(javax.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(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders, String headerName)
    • putVitamIdFromSessionInExternalHeader

      public static void putVitamIdFromSessionInExternalHeader(javax.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(javax.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