Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add contractagreements and contractagreements/{contractAgreementId}/negotiation to irs-edc-client #451

Merged
merged 31 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
adf1eaf
chore(logo):replace logo
mkanal Jan 31, 2024
d7dd4c5
chore(logo): adjust url to logo
mkanal Jan 31, 2024
38f83c3
chore(logo): adjust url to eclipse repos
mkanal Jan 31, 2024
ad739f2
chore(logo): add changelog entry
mkanal Jan 31, 2024
a9cf5f3
Merge branch 'main' into chore/#000-add-irs-log
ds-jhartmann Feb 19, 2024
360f7bf
fix(concept):[#367] fix typos
mkanal Feb 21, 2024
f60978a
Merge branch 'main' into chore/#367-industry-core-changes
mkanal Feb 21, 2024
e07fe75
fix(concept):[#367] assetLifecyclePhase is not used any more in 24.5
mkanal Feb 21, 2024
a31f72c
chore(concept):[#367] update to industry core for R24.5
mkanal Feb 22, 2024
98ae9f7
feature: 420 add /management/v2/contractagreements/request and GET /…
ds-lcapellino Feb 26, 2024
0c171ad
feature: 420 add javadoc
ds-lcapellino Feb 26, 2024
87d40cc
feature: 420 fix PMD failures
ds-lcapellino Feb 26, 2024
69edc86
feature: 420 fix PMD failures
ds-lcapellino Feb 26, 2024
dc399df
feature: 420 fix PMD failures
ds-lcapellino Feb 26, 2024
890c9c3
feature: 420 fix PMD failures
ds-lcapellino Feb 26, 2024
be4a28d
feature: 420 fix PMD failures
ds-lcapellino Feb 26, 2024
971fdbf
feature: 420 fix sonar findings
ds-lcapellino Feb 26, 2024
bdf831a
feature: 420 refactor
ds-lcapellino Feb 26, 2024
975eda7
feature: 420 refactor
ds-lcapellino Feb 26, 2024
ae86692
feature: 420 refactor
ds-lcapellino Feb 27, 2024
12dfc2b
feature: 420 refactor
ds-lcapellino Feb 27, 2024
eb40a9f
feat(impl):[#312] irs local helm setup
ds-ext-kmassalski Feb 27, 2024
728bb77
feat(impl):[#312] fix review comments
ds-ext-kmassalski Feb 27, 2024
4e69594
Merge remote-tracking branch 'origin/main' into chore/#000-add-irs-log
ds-jhartmann Feb 27, 2024
0a7f9d4
Merge pull request #750 from catenax-ng/chore/#000-add-irs-log
ds-jhartmann Feb 27, 2024
a5e939a
feat(impl):[#312] update copyright
ds-ext-kmassalski Feb 27, 2024
1811f32
feat(impl):[#312] update copyright
ds-ext-kmassalski Feb 27, 2024
dfd3cc4
fix(concept):[#367] fix URL schema in version matrix
ds-jhartmann Feb 27, 2024
f24edd0
Merge pull request #783 from catenax-ng/chore/#367-industry-core-changes
ds-jhartmann Feb 27, 2024
b3d04c8
Merge pull request #787 from catenax-ng/feature/420-add-contractagree…
ds-lcapellino Feb 28, 2024
fa870b3
Merge pull request #789 from catenax-ng/feature/312-irs-local-helm-setup
ds-ext-kmassalski Feb 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- DigitalTwinRegistryCreateShellService in irs-registry-client for creating shells in DTR directly
- POST /management/v2/contractagreements/request and GET /management/v2/contractagreements/{contractAgreementId}/negotiation to irs-edc-client lib

### Changed
- Change logo of irs

## [4.6.0] - 2024-02-20
### Added
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ![Item Relationship Service (IRS)](https://raw.githubusercontent.com/eclipse-tractusx/item-relationship-service/main/logo.png)
# ![Item Relationship Service (IRS)](https://github.com/eclipse-tractusx/item-relationship-service/blob/main/logo.png)


[![Apache 2 License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/eclipse-tractusx/item-relationship-service/blob/main/LICENSE)
[![Build](https://github.com/eclipse-tractusx/item-relationship-service/actions/workflows/irs-build.yml/badge.svg)](https://github.com/eclipse-tractusx/item-relationship-service/actions/workflows/irs-build.yml)
Expand Down
1 change: 1 addition & 0 deletions charts/irs-helm/templates/configmap-spring-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ data:
contract-negotiation: {{ .Values.edc.controlplane.endpoint.contractnegotiation | default "/v2/contractnegotiations" | quote }}
transfer-process: {{ .Values.edc.controlplane.endpoint.transferprocess | default "/v2/transferprocesses" | quote }}
state-suffix: {{ .Values.edc.controlplane.endpoint.statesuffix | default "/state" | quote }}
contract-agreements: {{ .Values.edc.controlplane.endpoint.contractAgreements | default "/v2/contractagreements" | quote }}
provider-suffix: {{ tpl .Values.edc.controlplane.provider.suffix . | quote }}
catalog-limit: {{ .Values.edc.controlplane.catalog.limit }}
catalog-page-size: {{ .Values.edc.controlplane.catalog.pagesize }}
Expand Down
1 change: 1 addition & 0 deletions charts/irs-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ edc:
contractnegotiation: /v2/contractnegotiations # EDC consumer controlplane contract negotiation path
transferprocess: /v2/transferprocesses # EDC consumer controlplane transfer process path
statesuffix: /state # Path of the state suffix for contract negotiation and transfer process
contractAgreements: /v2/contractagreements # EDC consumer controlplane contract agreements path
request:
ttl: PT10M # Requests to controlplane will time out after this duration (see https://en.wikipedia.org/wiki/ISO_8601#Durations)
provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,17 @@ The product IRS MUST align with the Industry Code Standard CX-126 and CX-127.

## Version matrix

| Artefact | Version | Availability | link |
|----------------------------|---------|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| AAS | | | |
| PartAsPlanned | 1.0.1 | Mandatory | [PartAsPlanned 1.0.1](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.part_as_planned/1.0.1) |
| PartAsPlanned | 2.0.0 | Optional (Mandatory for next version of CX-0126) | [PartAsPlanned 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.part_as_planned/2.0.0) |
| SingleLevelBomAsPlanned | 1.1.0 | Mandatory | [SingleLevelBomAsPlanned 1.1.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned/1.1.0)] |
| SingleLevelBomAsPlanned | 2.0.0 | Optional (Mandatory for next version of CX-0126) | [SingleLevelBomAsPlanned 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned/2.2.0)] |
| SerialPart | 1.0.1 | Mandatory | [SerialPart 1.0.1](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.serial_part/1.0.1) |
| SerialPart | 2.0.0 | Optional | [SerialPart 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.serial_part/2.0.0) |
| Batch | 2.0.0 | Mandatory | [Batch 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.batch/2.0.0) |
| Batch | 2.0.1 | Optional | [Batch 2.0.1](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.batch/2.0.1) |
| JustInSequencePart | 2.0.0 | Optional | [JustInSequencePart 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.just_in_sequence_part/2.0.0) |
| SingleLevelBomAsBuilt | 2.0.0 | Mandatory | [SingleLevelBomAsBuilt 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built/2.0.0) |
| PartSiteInformationAsBuilt | 1.0.0 | Integrated in Aspects JustInSequencePart / Batch / SerialPart | https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.shared.part_site_information_as_built/1.0.0 |

|Artefact| Version | Availability | link |
|---|---------|--------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| AAS | | | |
|PartAsPlanned | 2.0.0 | Mandatory | [PartAsPlanned 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.part_as_planned/2.0.0) |
| SingleLevelBomAsPlanned| 2.0.0 | Mandatory | [SingleLevelBomAsPlanned 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned/2.0.0) |
| SerialPart| 3.0.0 | Mandatory | [SerialPart 3.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.serial_part/3.0.0) |
| Batch| 3.0.0 | Mandatory | [Batch 3.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.batch/3.0.0) |
| JustInSequencePart| 3.0.0 | Mandatory | [JustInSequencePart 3.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.just_in_sequence_part/3.0.0) |
| SingleLevelBomAsBuilt| 2.0.0 | Mandatory | [SingleLevelBomAsBuilt 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built/2.0.0) |
| PartSiteInformationAsBuilt| 1.0.0 | Integrated in Aspects JustInSequencePart / Batch / SerialPart | [PartSiteInformationAsBuilt 1.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.shared.part_site_information_as_built/1.0.0) |


- JustInSequencePart: https://github.com/eclipse-tractusx/sldt-semantic-models/pull/563
Expand All @@ -72,6 +69,9 @@ The product IRS MUST align with the Industry Code Standard CX-126 and CX-127.
For serialized parts, batches, and JIS parts this will be deprecated with new version 3.x.x of AAS.
ASS parameter assetLifecyclePhase will not be used anymore to detect BOMLifecycle. Parameter 'digitalTwinType' is used instead.

**assetLifecyclePhase is not used to detect BomLifecyle any more.**


### Use parameter 'digitalTwinType' to detect BOMLifecycle

**Parameter 'digitalTwinType'**
Expand Down Expand Up @@ -99,30 +99,23 @@ alt aas contains 'digitalTwinType'
else digitalTwinType any other value or null
BOMLifecycleDetector -->> IRS : throw Exception
end
else aas contains 'assetLifecyclePhase'
alt assetLifecyclePhase="AsBuilt"
BOMLifecycleDetector -->> IRS : return asBuilt
else assetLifecyclePhase="AsPlanned"
BOMLifecycleDetector -->> IRS : return asPlanned
else assetLifecyclePhase any other value or null
BOMLifecycleDetector -->> IRS : throw Exception
end
else
IRS -->> BOMLifecycleDetector : throw Exception (BOMLifecylce could not be detected)
BOMLifecycleDetector -->> IRS : retrun BOMLifecyle
BOMLifecycleDetector -->> IRS : return BOMLifecyle
end

````

#### Configuration of parameter 'digitalTwinType'
Parameter is configurable for dDTR instance and has to be configured for integration test.
Setup dDTR registry on used environments. INT, DEV, PEN, STABLE

- [Values.yaml](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/blob/f438fe96a7ae1f1b920e8e4fb4114fb7af32643d/charts/registry/values.yaml#L51)
- [README.md](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/blob/f438fe96a7ae1f1b920e8e4fb4114fb7af32643d/charts/registry/README.md#:~:text=externalSubjectIdWildcardAllowedTypes)

values.yaml
````json
registry.externalSubjectIdWildcardAllowedTypes = manufacturerPartId,assetLifecyclePhase,digitalTwinType
registry.externalSubjectIdWildcardAllowedTypes = manufacturerPartId,digitalTwinType
````


Expand Down Expand Up @@ -186,7 +179,7 @@ values.yaml
|manufacturerId | Mandatory | The Business Partner Number (BPNL) of the manufacturer of the part. |
|manufacturerPartId | Mandatory | |
|customerPartId | Optional | |
|assetLifecyclePhase | asPlanned(Mandatory) / asBuilt(Optional) | @Deprecated For serialized parts, batches, and JIS parts, use the value AsBuilt. For catalog parts in a Digital Twin As-Planned lifecycle phase, use the value AsPlanned. |
|assetLifecyclePhase | asPlanned(Mandatory) / asBuilt(Optional) | @Deprecated Not used any more. For serialized parts, batches, and JIS parts, use the value AsBuilt. For catalog parts in a Digital Twin As-Planned lifecycle phase, use the value AsPlanned. |
|digitalTwinType | Mandatory | digitalTwinType="PartType" OR digitalTwinType="PartInstance" For parts on an instance level (e.g. serialized parts, batches, and JIS parts), use the value PartInstance. For parts on a part type level (e.g. catalog parts), use the value PartType. | | |

# PartAsPlanned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public static class EndpointConfig {
private String policyDefinition;
private String transferProcess;
private String stateSuffix;
private String contractAgreements;

}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/********************************************************************************
* Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.irs.edc.client.contract.model;

import java.util.List;

import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import org.eclipse.edc.connector.contract.spi.types.agreement.ContractAgreement;

/**
* EdcContractAgreementListWrapper used for wrapping the response of
* /management/v2/contractagreements/request where a List of {@link ContractAgreement} is returned.
*/
@ToString
@Builder
@RequiredArgsConstructor
@Getter
public class EdcContractAgreementsResponse {
private final List<ContractAgreement> contractAgreementList;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/********************************************************************************
* Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.irs.edc.client.contract.model.exception;

import org.eclipse.tractusx.irs.edc.client.exceptions.EdcClientException;

/**
* ContractAgreementException used for failures in
* {@link org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractAgreementService}
*/
public class ContractAgreementException extends EdcClientException {

public ContractAgreementException(final String message) {
super(message);
}
}
Loading
Loading