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 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:
      convert in interface org.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

      protected Map<String,List<String>> extractQueryParametersNoFormEncoding(javax.servlet.http.HttpServletRequest req)
    • extractAcceptLanguageHeader

      protected List<Locale> extractAcceptLanguageHeader(javax.servlet.http.HttpServletRequest req)
    • extractAcceptHeader

      protected List<String> extractAcceptHeader(javax.servlet.http.HttpServletRequest req)
    • extractRequestHeaders

      protected Map<String,List<String>> extractRequestHeaders(javax.servlet.http.HttpServletRequest request)