public class ContextRequestConverter extends Object implements org.springframework.core.convert.converter.Converter<String,ContextRequest>, org.springframework.core.Ordered
Allows conversion of the X-Context-Request
header json value into a
ContextRequest
instance. This is useful when specifying a @RequestHeader
instance
in a Spring rest controller method.
If the source is null, this returns an "empty" ContextRequest (non-null but no properties set)
Constructor and Description |
---|
ContextRequestConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
List<ContextRequestHydrator> hydrators,
com.broadleafcommerce.common.extension.data.DataRouteReference reference) |
Modifier and Type | Method and Description |
---|---|
ContextRequest |
convert(String source) |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
int |
getOrder() |
protected void |
validateRequestTenant(String tenantId,
String applicationId,
String catalogId,
String customerContextId) |
public ContextRequestConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<ContextRequestHydrator> hydrators, com.broadleafcommerce.common.extension.data.DataRouteReference reference)
@NonNull public ContextRequest convert(String source)
convert
in interface org.springframework.core.convert.converter.Converter<String,ContextRequest>
protected void validateRequestTenant(@Nullable String tenantId, @Nullable String applicationId, @Nullable String catalogId, @Nullable String customerContextId)
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Copyright © 2021. All rights reserved.