Class HeaderIdHelper


  • public class HeaderIdHelper
    extends java.lang.Object
    HeaderId Helper, check and put header values
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HeaderIdHelper.Context
      Context of request
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getHeaderString​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders, java.lang.String headerName)  
      static void putVitamIdFromExternalHeaderInSession​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders, HeaderIdHelper.Context ctx)
      Extracts the vitam id from the headers to save it through the VitamSession
      static void putVitamIdFromHeaderInSession​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders, HeaderIdHelper.Context ctx)
      Extracts the vitam id from the headers to save it through the VitamSession
      static void putVitamIdFromSessionInExternalHeader​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> headers, HeaderIdHelper.Context ctx, int statusCode)
      Retrieves the vitam id from the VitamSession and add a X-TENANT-ID header
      static void putVitamIdFromSessionInHeader​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.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 Detail

      • putVitamIdFromExternalHeaderInSession

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

        public static void putVitamIdFromSessionInExternalHeader​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.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<java.lang.String,​java.lang.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