forked from sovity/edc-ce
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: contract termination API (sovity#987)
- Loading branch information
1 parent
6f055a0
commit 7c1f878
Showing
11 changed files
with
261 additions
and
12 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
30 changes: 30 additions & 0 deletions
30
...-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/ContractAgreementPageQuery.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,30 @@ | ||
/* | ||
* Copyright (c) 2024 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 lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Schema(description = "Filters for querying a Contract Contract Agreement Page") | ||
public class ContractAgreementPageQuery { | ||
@Schema( | ||
description = "Optionally filter the resulting contract agreements by their termination status.", | ||
requiredMode = Schema.RequiredMode.NOT_REQUIRED) | ||
private ContractTerminationStatus terminationStatus; | ||
} |
43 changes: 43 additions & 0 deletions
43
...rc/main/java/de/sovity/edc/ext/wrapper/api/ui/model/ContractAgreementTerminationInfo.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,43 @@ | ||
/* | ||
* Copyright (c) 2024 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 lombok.NoArgsConstructor; | ||
|
||
import java.time.OffsetDateTime; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Schema(description = "Contract's agreement metadata") | ||
public class ContractAgreementTerminationInfo { | ||
|
||
@Schema(description = "Termination's date and time", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private OffsetDateTime terminatedAt; | ||
|
||
@Schema( | ||
title = "Termination's reason", | ||
description = "The termination's nature e.g. User Termination", | ||
requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String reason; | ||
|
||
@Schema( | ||
description = "Detailed message from the terminating party about why the contract was terminated.", | ||
requiredMode = Schema.RequiredMode.REQUIRED | ||
) | ||
private String detail; | ||
} |
42 changes: 42 additions & 0 deletions
42
...-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/ContractTerminationRequest.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,42 @@ | ||
/* | ||
* Copyright (c) 2024 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.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
@Schema(description = "Data for terminating a Contract Agreement") | ||
public class ContractTerminationRequest { | ||
|
||
@Schema( | ||
title = "Termination reason", | ||
description = "A short reason why this contract was terminated", | ||
requiredMode = Schema.RequiredMode.REQUIRED) | ||
String reason; | ||
|
||
@Schema( | ||
title = "Termination detail", | ||
description = "A user explanation to detail why the contract was terminated.", | ||
requiredMode = Schema.RequiredMode.NOT_REQUIRED) | ||
String detail; | ||
} |
19 changes: 19 additions & 0 deletions
19
...r-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/ContractTerminationStatus.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,19 @@ | ||
/* | ||
* Copyright (c) 2024 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; | ||
|
||
public enum ContractTerminationStatus { | ||
ONGOING, | ||
TERMINATED | ||
} |
Oops, something went wrong.