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 Object
implements org.springframework.core.convert.converter.Converter<javax.servlet.http.HttpServletRequest,org.apache.olingo.odata2.api.processor.ODataRequest>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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(String method) Translates the name of the HttpServletRequest method into a ODataHttpMethodextractAcceptHeader(javax.servlet.http.HttpServletRequest req) extractAcceptLanguageHeader(javax.servlet.http.HttpServletRequest req) protected StringextractContentType(javax.servlet.http.HttpServletRequest req) protected org.apache.olingo.odata2.api.uri.PathInfoextractPathInfo(javax.servlet.http.HttpServletRequest req) extractQueryParametersNoFormEncoding(javax.servlet.http.HttpServletRequest req) extractRequestHeaders(javax.servlet.http.HttpServletRequest request) 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
-
HttpServletRequestToODataRequestConverter
public HttpServletRequestToODataRequestConverter()
-
-
Method Details
-
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(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 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
-
extractAcceptLanguageHeader
-
extractAcceptHeader
-
extractRequestHeaders
-