Class 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>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.olingo.odata2.api.processor.ODataRequest convert​(javax.servlet.http.HttpServletRequest request)
      Converts a HttpServletRequest into a ODataRequest.
      protected org.apache.olingo.odata2.api.commons.ODataHttpMethod convertStringToODataHttpMethod​(java.lang.String method)
      Translates the name of the HttpServletRequest method into a ODataHttpMethod
      protected 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.String extractContentType​(javax.servlet.http.HttpServletRequest req)  
      protected org.apache.olingo.odata2.api.uri.PathInfo extractPathInfo​(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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.core.convert.converter.Converter

        andThen
    • Constructor Detail

      • HttpServletRequestToODataRequestConverter

        public HttpServletRequestToODataRequestConverter()
    • 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:
        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​(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)