Class AbstractService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.fasterxml.jackson.databind.ObjectMapper mapper  
      protected org.springframework.web.client.RestTemplate restTemplate  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractService​(org.springframework.web.client.RestTemplate restTemplate, GoodDataSettings settings)
      Sets RESTful HTTP Spring template.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <T> T extractData​(org.springframework.http.client.ClientHttpResponse response, java.lang.Class<T> cls)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • restTemplate

        protected final org.springframework.web.client.RestTemplate restTemplate
      • mapper

        protected final com.fasterxml.jackson.databind.ObjectMapper mapper
    • Constructor Detail

      • AbstractService

        public AbstractService​(org.springframework.web.client.RestTemplate restTemplate,
                               GoodDataSettings settings)
        Sets RESTful HTTP Spring template. Should be called from constructor of concrete service extending this abstract one.
        Parameters:
        restTemplate - RESTful HTTP Spring template
        settings - settings
    • Method Detail

      • extractData

        protected final <T> T extractData​(org.springframework.http.client.ClientHttpResponse response,
                                          java.lang.Class<T> cls)
                                   throws java.io.IOException
        Throws:
        java.io.IOException