Skip to content

Commit

Permalink
feat: Transfer history model (#359)
Browse files Browse the repository at this point in the history
* feat: Adding Transfer History Page Model(WIP)

* feat: Adding Transfer History Page Model

* feat: updated data model of transfer
entry page

* chore: renamed data model of transfer
entry page

* feat: build dates for LastCommitInfoExtension (#357)

* feat: Reworking Last commit Info Extension

* chore: make pipeline set both jar and env build date and last commit info, fix wording

* Updated CHANGELOG.md

---------

* Updated CHANGELOG.md

* Updated UiResource to add transferhistorypage endpoint

---------

Co-authored-by: Richard Treier <[email protected]>
  • Loading branch information
AnurosePrakash and richardtreier authored May 31, 2023
1 parent b1282bf commit 438e193
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Minor Changes

- Added build dates to Last Commit Info Extension
- Added Transfer History Page model to API Wrapper

### Patch Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package de.sovity.edc.ext.wrapper.api.ui;

import de.sovity.edc.ext.wrapper.api.ui.model.ContractAgreementPage;
import de.sovity.edc.ext.wrapper.api.ui.model.TransferHistoryPage;
import de.sovity.edc.ext.wrapper.api.ui.services.ContractAgreementPageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand All @@ -37,4 +38,12 @@ public class UiResource {
public ContractAgreementPage contractAgreementEndpoint() {
return contractAgreementApiService.contractAgreementPage();
}

@GET
@Path("pages/transfer-history-page")
@Produces(MediaType.APPLICATION_JSON)
public TransferHistoryPage transferHistoryPageEndpoint() {
// TODO: Implement
throw new IllegalStateException("Not yet implemented");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* 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.ui.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.OffsetDateTime;

@Data
@Schema(description = "Transfer History Entry for Transfer History Page")
public class TransferHistoryEntry {
@Schema(description = "Transfer Process ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String transferProcessId;

@Schema(description = "Created Date", requiredMode = Schema.RequiredMode.REQUIRED)
private OffsetDateTime createdDate;

@Schema(description = "Last Change Date", requiredMode = Schema.RequiredMode.REQUIRED)
private OffsetDateTime lastUpdatedDate;

@Schema(description = "Transfer History State", requiredMode = Schema.RequiredMode.REQUIRED)
private TransferProcessState state;

@Schema(description = "Contract Agreement ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String contractAgreementId;

@Schema(description = "Incoming vs Outgoing", requiredMode = Schema.RequiredMode.REQUIRED)
private ContractAgreementDirection direction;

@Schema(description = "Other Connector's Endpoint", requiredMode = Schema.RequiredMode.REQUIRED)
private String counterPartyConnectorEndpoint;

@Schema(description = "Asset Name", requiredMode = Schema.RequiredMode.REQUIRED)
private String assetName;

@Schema(description = "Asset ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String assetId;

@Schema(description = "Error Message")
private String errorMessage;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.ui.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

@Data
@AllArgsConstructor
public class TransferHistoryPage {
@Schema(description = "Transfer History Page Entries", requiredMode = Schema.RequiredMode.REQUIRED)
private List<TransferHistoryEntry> transferEntries;
}

0 comments on commit 438e193

Please sign in to comment.