Package fr.gouv.vitam.common.server
Class HeaderIdHelper
java.lang.Object
fr.gouv.vitam.common.server.HeaderIdHelper
HeaderId Helper, check and put header values
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getHeaderString
(javax.ws.rs.core.MultivaluedMap<String, String> requestHeaders, String headerName) 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 VitamSessionstatic 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 VitamSessionstatic 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 headerstatic 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
-
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
-
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
-