-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/sovity/edc-extensions into …
…410-backend-ui-api-wrapper-get-policies-endpoint-with-02x # Conflicts: # CHANGELOG.md # connector/.env # docker-compose-dev.yaml # docs/postman_collection.json # e2e-test/src/test/java/de/sovity/edc/extension/e2e/PostgresFlywayExtensionTest.java # e2e-test/src/test/java/de/sovity/edc/extension/e2e/connector/Connector.java # e2e-test/src/test/java/de/sovity/edc/extension/e2e/connector/TestConnector.java # e2e-test/src/test/java/de/sovity/edc/extension/e2e/connector/factory/TestConnectorFactory.java # extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/WrapperExtension.java # extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/WrapperExtensionContextBuilder.java # extensions/wrapper/wrapper/src/main/java/de/sovity/edc/ext/wrapper/api/ui/UiResource.java
- Loading branch information
Showing
20 changed files
with
294 additions
and
98 deletions.
There are no files selected for viewing
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
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
31 changes: 31 additions & 0 deletions
31
e2e-test/src/test/java/de/sovity/edc/extension/e2e/connector/config/EdcApiGroup.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,31 @@ | ||
/* | ||
* Copyright (c) 2023 sovity GmbH | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* sovity GmbH - init | ||
*/ | ||
|
||
package de.sovity.edc.extension.e2e.connector.config; | ||
|
||
public enum EdcApiGroup { | ||
DEFAULT(""), | ||
PROTOCOL("protocol"), | ||
MANAGEMENT("management"), | ||
CONTROL("control"); | ||
|
||
private final String dataSourcePropertyName; | ||
|
||
EdcApiGroup(String dataSourcePropertyName) { | ||
this.dataSourcePropertyName = dataSourcePropertyName; | ||
} | ||
|
||
public String getDataSourcePropertyName() { | ||
return dataSourcePropertyName; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
e2e-test/src/test/java/de/sovity/edc/extension/e2e/connector/config/EdcApiGroupConfig.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,53 @@ | ||
/* | ||
* Copyright (c) 2023 sovity GmbH | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* sovity GmbH - init | ||
*/ | ||
|
||
package de.sovity.edc.extension.e2e.connector.config; | ||
|
||
import java.net.URI; | ||
import java.util.Map; | ||
|
||
public record EdcApiGroupConfig( | ||
EdcApiGroup edcApiGroup, | ||
String baseUrl, | ||
int port, | ||
String path) implements EdcConfig { | ||
|
||
private static final String SETTING_WEB_HTTP_PATH = "web.http.%s.path"; | ||
private static final String SETTING_WEB_HTTP_PORT = "web.http.%s.port"; | ||
private static final String SETTING_WEB_HTTP_DEFAULT_PATH = "web.http.path"; | ||
private static final String SETTING_WEB_HTTP_DEFAULT_PORT = "web.http.port"; | ||
|
||
public URI getUri() { | ||
return URI.create(String.format("%s:%s%s", baseUrl, port, path)); | ||
} | ||
|
||
@Override | ||
public Map<String, String> toMap() { | ||
if ("".equals(edcApiGroup.getDataSourcePropertyName())) { | ||
return Map.of( | ||
SETTING_WEB_HTTP_DEFAULT_PATH, path, | ||
SETTING_WEB_HTTP_DEFAULT_PORT, String.valueOf(port) | ||
); | ||
} else { | ||
var webHttpPathProperty = String.format( | ||
SETTING_WEB_HTTP_PATH, | ||
edcApiGroup.getDataSourcePropertyName()); | ||
var webHttpPortProperty = String.format( | ||
SETTING_WEB_HTTP_PORT, | ||
edcApiGroup.getDataSourcePropertyName()); | ||
return Map.of( | ||
webHttpPathProperty, path, | ||
webHttpPortProperty, String.valueOf(port)); | ||
} | ||
} | ||
} |
Oops, something went wrong.