Class ContextRequestConverter
java.lang.Object
com.broadleafcommerce.data.tracking.core.web.ContextRequestConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<String,,ContextRequest> org.springframework.core.Ordered
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)
- Author:
- Jeff Fischer
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionContextRequestConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<ContextRequestHydrator> hydrators, com.broadleafcommerce.common.extension.data.DataRouteReference reference) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
ContextRequestConverter
public ContextRequestConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<ContextRequestHydrator> hydrators, com.broadleafcommerce.common.extension.data.DataRouteReference reference)
-
-
Method Details
-
convert
- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<String,ContextRequest>
-
validateRequestTenant
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-