Skip to content

Commit

Permalink
fix: fixed review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
eschrewe committed Dec 5, 2023
1 parent 1bad5f9 commit 77bddb9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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 @@ -48,7 +48,7 @@ public class EdcController {
*/
@GetMapping("/catalog")
@CrossOrigin
public ResponseEntity<String> getEDCCatalog(@RequestParam String dspUrl) {
public ResponseEntity<String> getCatalog(@RequestParam String dspUrl) {
try {
var catalog = edcAdapter.getCatalog(dspUrl);
return ResponseEntity.ok(catalog.toPrettyString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private Response sendPostRequest(JsonNode requestBody, List<String> pathSegments
*
* @return true if all registrations were successful, otherwise false
*/
public boolean doInitialAssetRegistration() {
public boolean registerAssetsInitially() {
boolean result;
log.info("Registration of product-stock request api successful " + (result = registerApiAsset(DT_ApiMethodEnum.REQUEST)));
if (!result) return false;
Expand Down Expand Up @@ -359,7 +359,7 @@ public String[] getContractForRequestApi(Partner partner) {
filter.put("asset:prop:apibusinessobject", "product-stock");
filter.put("asset:prop:apipurpose", "request");
filter.put("asset:prop:version", variablesService.getPurisApiVersion());
return getContractForRequestOrResponseApiApi(partner, filter);
return getContractForRequestOrResponseApi(partner, filter);
}

/**
Expand All @@ -377,7 +377,7 @@ public String[] getContractForResponseApi(Partner partner) {
filter.put("asset:prop:apibusinessobject", "product-stock");
filter.put("asset:prop:apipurpose", "response");
filter.put("asset:prop:version", variablesService.getPurisApiVersion());
return getContractForRequestOrResponseApiApi(partner, filter);
return getContractForRequestOrResponseApi(partner, filter);
}

/**
Expand All @@ -391,7 +391,7 @@ public String[] getContractForResponseApi(Partner partner) {
* @param filter The filter to be applied on the level of the asset's properties object.
* @return A String array or null, if negotiation or transfer have failed or the authCode did not arrive
*/
public String[] getContractForRequestOrResponseApiApi(Partner partner, Map<String, String> filter) {
private String[] getContractForRequestOrResponseApi(Partner partner, Map<String, String> filter) {
try {
JsonNode catalogItem = getCatalogItems(partner.getEdcUrl(), filter).get(0);
JsonNode negotiationResponse = initiateNegotiation(partner, catalogItem);
Expand Down

0 comments on commit 77bddb9

Please sign in to comment.