Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update naming conventions in EDC classes #102

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class AssetCreatorCommandLineRunner implements CommandLineRunner {

@Override
public void run(String... args) throws Exception {
if (!edcAdapterService.doInitialAssetRegistration()) {
if (!edcAdapterService.registerAssetsInitially()) {
// retry
int retryDelaySeconds = 3;
log.warn("retrying initial asset registration in " + retryDelaySeconds + " seconds");
Thread.sleep(retryDelaySeconds * 1000);
log.warn("retry successful: " + edcAdapterService.doInitialAssetRegistration());
log.warn("retry successful: " + edcAdapterService.registerAssetsInitially());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.net.URL;
import java.util.List;

/**
Expand All @@ -49,9 +48,9 @@ public class EdcController {
*/
@GetMapping("/catalog")
@CrossOrigin
public ResponseEntity<String> getEDCCatalog(@RequestParam String dspUrl) {
public ResponseEntity<String> getCatalog(@RequestParam String dspUrl) {
try {
var catalog = edcAdapter.getDSPCatalog(dspUrl);
var catalog = edcAdapter.getCatalog(dspUrl);
return ResponseEntity.ok(catalog.toPrettyString());
} catch (IOException e) {
log.warn(e.getMessage());
Expand All @@ -69,7 +68,7 @@ public ResponseEntity<String> getEDCCatalog(@RequestParam String dspUrl) {
@CrossOrigin
public ResponseEntity<String> getAssets(@RequestParam String assetId) {
try {
var result = edcAdapter.sendDspGetRequest(List.of("v3", "assets", assetId));
var result = edcAdapter.sendGetRequest(List.of("v3", "assets", assetId));
var stringData = result.body().string();
result.body().close();
return ResponseEntity.ok(stringData);
Expand Down
Loading
Loading