Class RestConnector

java.lang.Object
com.isomorphic.base.Base
All Implemented Interfaces:
com.isomorphic.base.IAutoConfigurable, com.isomorphic.datasource.Committable, com.isomorphic.datasource.FreeResourcesHandler, com.isomorphic.datasource.IType, IToJSON, Serializable
Direct Known Subclasses:
ODataDataSource, RESTDataSource

public class RestConnector extends BasicDataSource
This class is DataSource implementation that connect to many different types of REST webservice. RestConnector is configured in the DataSource descriptor (*.ds.xml file). Scan the client-side reference docs for "RestConnector" for full documentation of this class
See Also:
  • Method Details

    • transformRawResponse

      public void transformRawResponse(List untransformed, DSRequest dsRequest, DSResponse dsResponse) throws Exception
      Override point to allow your DataSource implementation to perform arbitrary transformations of the response data prior to processing the data through templating. You should perform the transformations in place on the List passed in to the method. Note, if your use case does not involve templating (search the client-side documentation for "responseTemplate"), there is no difference between putting transformation logic in this method, or in DataSource.transformResponse(List, DSRequest, DSResponse), because they are merely the pre-templating and post-templating transformation hooks. For the same reason, this method is specific to RESTDataSource - only RESTDataSource has the concept of templating.

      If you prefer a script-based approach, search the client-side documentation for "transformResponseScript". Note, if you override this method AND provide a transformResponseScript, this method runs first, and any transformations it makes will be visible to the script

      Throws:
      Exception