Class HttpServletRequestToODataRequestConverter
- java.lang.Object
-
- de.hybris.platform.odata2webservices.converter.HttpServletRequestToODataRequestConverter
-
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<javax.servlet.http.HttpServletRequest,org.apache.olingo.odata2.api.processor.ODataRequest>
public class HttpServletRequestToODataRequestConverter extends java.lang.Object implements org.springframework.core.convert.converter.Converter<javax.servlet.http.HttpServletRequest,org.apache.olingo.odata2.api.processor.ODataRequest>
-
-
Constructor Summary
Constructors Constructor Description HttpServletRequestToODataRequestConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.olingo.odata2.api.processor.ODataRequestconvert(javax.servlet.http.HttpServletRequest request)Converts a HttpServletRequest into a ODataRequest.protected org.apache.olingo.odata2.api.commons.ODataHttpMethodconvertStringToODataHttpMethod(java.lang.String method)Translates the name of the HttpServletRequest method into a ODataHttpMethodprotected java.util.List<java.lang.String>extractAcceptHeader(javax.servlet.http.HttpServletRequest req)protected java.util.List<java.util.Locale>extractAcceptLanguageHeader(javax.servlet.http.HttpServletRequest req)protected java.lang.StringextractContentType(javax.servlet.http.HttpServletRequest req)protected org.apache.olingo.odata2.api.uri.PathInfoextractPathInfo(javax.servlet.http.HttpServletRequest req)protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>extractQueryParametersNoFormEncoding(javax.servlet.http.HttpServletRequest req)protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>extractRequestHeaders(javax.servlet.http.HttpServletRequest request)
-
-
-
Method Detail
-
convert
public org.apache.olingo.odata2.api.processor.ODataRequest convert(javax.servlet.http.HttpServletRequest request)
Converts a HttpServletRequest into a ODataRequest.- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<javax.servlet.http.HttpServletRequest,org.apache.olingo.odata2.api.processor.ODataRequest>- Parameters:
request- - HttpServletRequest that needs to be converted to a ODataRequest.- Returns:
- - ODataRequest object based off of the request param and oDattaHttpMethod set during the instantiation of this class.
-
convertStringToODataHttpMethod
protected org.apache.olingo.odata2.api.commons.ODataHttpMethod convertStringToODataHttpMethod(java.lang.String method)
Translates the name of the HttpServletRequest method into a ODataHttpMethod- Parameters:
method- - httpServletRequestMethod- Returns:
- - equivalent ODataHttpMethod that has a name equal to the method String parameter.
-
extractContentType
protected java.lang.String extractContentType(javax.servlet.http.HttpServletRequest req) throws org.apache.olingo.odata2.api.exception.ODataUnsupportedMediaTypeException- Throws:
org.apache.olingo.odata2.api.exception.ODataUnsupportedMediaTypeException
-
extractPathInfo
protected org.apache.olingo.odata2.api.uri.PathInfo extractPathInfo(javax.servlet.http.HttpServletRequest req) throws org.apache.olingo.odata2.api.exception.ODataException- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
extractQueryParametersNoFormEncoding
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> extractQueryParametersNoFormEncoding(javax.servlet.http.HttpServletRequest req)
-
extractAcceptLanguageHeader
protected java.util.List<java.util.Locale> extractAcceptLanguageHeader(javax.servlet.http.HttpServletRequest req)
-
extractAcceptHeader
protected java.util.List<java.lang.String> extractAcceptHeader(javax.servlet.http.HttpServletRequest req)
-
extractRequestHeaders
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> extractRequestHeaders(javax.servlet.http.HttpServletRequest request)
-
-