-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: data offer and connector detail pages (broker server api) (#377)
- Loading branch information
1 parent
32a024d
commit 56ba5e3
Showing
6 changed files
with
202 additions
and
1 deletion.
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
34 changes: 34 additions & 0 deletions
34
...pi/src/main/java/de/sovity/edc/ext/wrapper/api/broker/model/ConnectorDetailPageQuery.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,34 @@ | ||
/* | ||
* Copyright (c) 2022 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 - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.ext.wrapper.api.broker.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Schema(description = "Connector Page Detail Query") | ||
public class ConnectorDetailPageQuery { | ||
@Schema(description = "Connector Endpoint1") | ||
private String connectorEndpoint; | ||
} | ||
|
53 changes: 53 additions & 0 deletions
53
...i/src/main/java/de/sovity/edc/ext/wrapper/api/broker/model/ConnectorDetailPageResult.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 - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.ext.wrapper.api.broker.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.time.OffsetDateTime; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Schema(description = "Connector Detail Page Data") | ||
public class ConnectorDetailPageResult { | ||
@Schema(description = "Connector ID", example = "https://my-test.connector", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String id; | ||
|
||
@Schema(description = "Connector Endpoint", example = "https://my-test.connector/control/ids/data", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String endpoint; | ||
|
||
@Schema(description = "Creation date in Broker", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private OffsetDateTime createdAt; | ||
|
||
@Schema(description = "Last time the connector was successfully refreshed.") | ||
private OffsetDateTime lastSuccessfulRefreshAt; | ||
|
||
@Schema(description = "Last time the connector was tried to be refreshed.") | ||
private OffsetDateTime lastRefreshAttemptAt; | ||
|
||
@Schema(description = "Connector Online Status", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private ConnectorOnlineStatus onlineStatus; | ||
|
||
@Schema(description = "Number of known data offerings") | ||
private Integer numContractOffers; | ||
} |
37 changes: 37 additions & 0 deletions
37
...pi/src/main/java/de/sovity/edc/ext/wrapper/api/broker/model/DataOfferDetailPageQuery.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,37 @@ | ||
/* | ||
* 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 - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.ext.wrapper.api.broker.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Schema(description = "Data Offer Detail Page Query") | ||
public class DataOfferDetailPageQuery { | ||
@Schema(description = "Connector Endpoint") | ||
private String connectorEndpoint; | ||
|
||
@Schema(description = "Asset ID") | ||
private String assetId; | ||
} | ||
|
58 changes: 58 additions & 0 deletions
58
...i/src/main/java/de/sovity/edc/ext/wrapper/api/broker/model/DataOfferDetailPageResult.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,58 @@ | ||
/* | ||
* 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 - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.ext.wrapper.api.broker.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.time.OffsetDateTime; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Schema(description = "Data Offer Detail Page.") | ||
public class DataOfferDetailPageResult { | ||
@Schema(description = "ID of asset", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String assetId; | ||
|
||
@Schema(description = "Connector Endpoint", example = "https://my-test.connector/control/ids/data", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String connectorEndpoint; | ||
|
||
@Schema(description = "Connector Online Status", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private ConnectorOnlineStatus connectorOnlineStatus; | ||
|
||
@Schema(description = "Date to be displayed as last update date, for online connectors it's the last refresh date, for offline connectors it's the creation date or last successful fetch.") | ||
private OffsetDateTime connectorOfflineSinceOrLastUpdatedAt; | ||
|
||
@Schema(description = "Creation date in Broker", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private OffsetDateTime createdAt; | ||
|
||
@Schema(description = "Update date in Broker", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private OffsetDateTime updatedAt; | ||
|
||
@Schema(description = "Asset properties", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private Map<String, String> properties; | ||
|
||
@Schema(description = "Available Contract Offers", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private List<DataOfferListEntryContractOffer> contractOffers; | ||
} |