-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MODFQMMGR-625] Aggregate dropdown values from all tenants in ECS env…
…ironments (#575)
- Loading branch information
Showing
8 changed files
with
54 additions
and
25 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/org/folio/fqm/client/CrossTenantHttpClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.folio.fqm.client; | ||
|
||
import org.folio.fqm.config.CrossTenantFeignConfig; | ||
import org.folio.spring.integration.XOkapiHeaders; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.cloud.openfeign.SpringQueryMap; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
|
||
import java.util.Map; | ||
|
||
@Service | ||
@FeignClient(name = "cross-tenant-http-client", url = ".", configuration = CrossTenantFeignConfig.class) | ||
public interface CrossTenantHttpClient { | ||
/** | ||
* Retrieve arbitrary data from a FOLIO API endpoint for the specified tenant. | ||
* @param path - the path of the API endpoint | ||
* @param queryParams - a map of query parameters to pass to the API endpoint | ||
* @param tenant - FOLIO tenant from which to retrieve data | ||
* @return the body of the response (JSON) | ||
*/ | ||
@GetMapping(value = "/{path}", produces = MediaType.APPLICATION_JSON_VALUE) | ||
String get(@PathVariable String path, @SpringQueryMap Map<String, String> queryParams, @RequestHeader(XOkapiHeaders.TENANT) String tenant); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters