All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gooddata.sdk.service.GoodDataRestProvider Maven / Gradle / Ivy

There is a newer version: 3.11.1+api3
Show newest version
/*
 * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved.
 * This source code is licensed under the BSD-style license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */
package com.gooddata.sdk.service;

import com.gooddata.sdk.service.gdc.DataStoreService;
import org.springframework.web.client.RestTemplate;

import java.util.Optional;
import java.util.function.Supplier;

/**
 * The main interface responsible for GoodData platform REST connection management.
 * Should provide completely configured {@link RestTemplate} capable to perform valid
 * communication with GoodData platform REST API. Mainly the following functionality should
 * be provided:
 * 
    *
  • prefixing the URI by API endpoint - services use only path part of URI
  • *
  • authentication
  • *
  • applying {@link GoodDataSettings} - especially user agent, headers and connection settings
  • *
  • configuring proper error handler (i.e. {@link com.gooddata.sdk.service.util.ResponseErrorHandler})
  • *
* * The default implementation (internally used by {@link GoodData} is {@link com.gooddata.sdk.service.httpcomponents.LoginPasswordGoodDataRestProvider}. */ public interface GoodDataRestProvider { /** * Settings used by the provider. * * @return used settings */ GoodDataSettings getSettings(); /** * Configured RestTemplate instance. * * @return provided RestTemplate */ RestTemplate getRestTemplate(); /** * Configured DataStoreService if provided. By default empty. * * @param stagingUriSupplier supplier of the data store endpoint * @return dataStoreService (empty by default) */ default Optional getDataStoreService(final Supplier stagingUriSupplier) { return Optional.empty(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy