-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from sachinargade123/release-pcf-2408
PCF exchange implementation update for 2408 release
- Loading branch information
Showing
47 changed files
with
601 additions
and
313 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,21 +24,39 @@ | |
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.stereotype.Component; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
@Configuration | ||
@Getter | ||
public class PCFAssetStaticPropertyHolder { | ||
|
||
@Value(value = "${digital-twin.pcf.sematicid:}") | ||
public String sematicId; | ||
|
||
@Value(value = "${digital-twin.pcf.sematicid:}") | ||
@Value(value = "${digital-twin.pcf.sematicid-part:}") | ||
public String sematicIdPart; | ||
|
||
@Value("${edc.asset.prop.type.pcfexchange.value:PcfExchange}") | ||
private String assetPropTypePCFExchangeType; | ||
|
||
@Value("${edc.policy.pcf.access:tx:BusinessPartnerGroup@odrl:eq@pcf-business-partner-group;Membership@active}") | ||
private String pcfExchangeAccessPolicy; | ||
|
||
private String pcfExchangeAssetId; | ||
@Value("#{'${edc.policy.pcf.bpn:}'.split(',')}") | ||
private List<String> whiteListBusinessList; | ||
private static String PCF_BG = "pcf-business-partner-group"; | ||
|
||
@Value("${edc.policy.pcf.usage:FrameworkAgreement@DataExchangeGovernance:1.0;Membership@active;[email protected]:1}") | ||
private String pcfExchangeUsagePolicy; | ||
|
||
private String pcfExchangeAssetId; | ||
|
||
public String getSematicId() { | ||
if (StringUtils.isAllBlank(sematicId)) | ||
sematicId = "urn:samm:io.catenax.pcf:6.0.0#Pcf"; | ||
sematicId = "urn:samm:io.catenax.pcf:7.0.0#Pcf"; | ||
return sematicId; | ||
} | ||
|
||
|
@@ -63,5 +81,9 @@ public String getPcfExchangeAssetId() { | |
public void setPcfExchangeAssetId(String pcfExchangeAssetId) { | ||
this.pcfExchangeAssetId = pcfExchangeAssetId; | ||
} | ||
|
||
public String getPcfBusinessPartnerGroup() { | ||
return PCF_BG; | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
public class Policies { | ||
|
||
private String technicalKey; | ||
private String operator; | ||
private List<String> value; | ||
|
||
} |
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
55 changes: 55 additions & 0 deletions
55
...-core/src/main/java/org/eclipse/tractusx/sde/configuration/BPDMExchangeAssetConsumer.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,55 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2023,2024 T-Systems International GmbH | ||
* Copyright (c) 2023,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.sde.configuration; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.tractusx.sde.core.service.PartnerPoolService; | ||
import org.eclipse.tractusx.sde.portal.model.response.LegalEntityResponse; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.SneakyThrows; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Configuration | ||
@RequiredArgsConstructor | ||
@Profile("default") | ||
public class BPDMExchangeAssetConsumer { | ||
|
||
private final PartnerPoolService partnerPoolService; | ||
|
||
@PostConstruct | ||
@SneakyThrows | ||
public void init() { | ||
try { | ||
List<LegalEntityResponse> legalEntitiesResponse = partnerPoolService.fetchLegalEntitiesData(null, "test", 0, | ||
10); | ||
log.info("BPDM service ready to use, 'test' company found leagal entity =>" + legalEntitiesResponse.size()); | ||
} catch (Exception e) { | ||
log.error("Unable to perform auto negotiation for BPDM service for legal entiry search"); | ||
} | ||
} | ||
|
||
} |
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
61 changes: 0 additions & 61 deletions
61
.../sde-core/src/main/java/org/eclipse/tractusx/sde/core/properties/SdeCommonProperties.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.