Skip to content

Commit c01fd0e

Browse files
refactor(PartnerServiceImpl): use PatternStore for BPN regexes
1 parent f447989 commit c01fd0e

File tree

8 files changed

+128
-10
lines changed

8 files changed

+128
-10
lines changed

CHANGELOG.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,69 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v4.0.1
9+
10+
The following Changelog lists the changes. Please refer to the [documentation](docs/README.md) for configuration needs and understanding the concept changes.
11+
12+
The **need for configuration updates** is **marked bold**.
13+
14+
### Added
15+
16+
- /
17+
18+
### Changed
19+
20+
- Refactored partner service to use patternStore regexes for BPNL/S/A ([#1001](https://github.com/eclipse-tractusx/puris/pull/1001))
21+
22+
### Fixes
23+
24+
- /
25+
26+
### Known Knowns
27+
28+
#### Running With Shared DTR and EDC
29+
30+
PURIS FOSS may not be run on a shared DTR and EDC with full scope. See [Admin Guide](docs/admin/Admin_Guide.md#running-the-puris-foss-application-on-shared-enablement-services) for more information of possible scenarios.
31+
32+
#### Upgradeability
33+
34+
Data base migrations are performed but assets.
35+
36+
#### Data Sovereignty
37+
38+
For productive use the following enhancements are encouraged
39+
40+
* User FrontEnd available: Role Company Admin is able to query catalogue and see negotiations and transfers But company rules / policies need to be configured upfront in backend (via postman) to enable automatic contract negotiations, responsibility lies with Company Admin role
41+
--> add section in the User Manual describing this and the (legal) importance and responsibility behind defining these rules
42+
* Currently only one standard policy per reg. connector / customer instance is supported (more precisely one for DTR, one for all submodels), negotiation happens automatically based on this
43+
--> enhance option to select partner and define specific policies (to be planned in context of BPDM Integration)
44+
--> UI for specific configuration by dedicated role (e.g. Comp Admin) and more flexible policy configuration (withoutv code changes) is needed
45+
* As a non-Admin user I do not have ability to view policies in detail
46+
--> transparency for users when interacting with and requesting / consuming data via dashboard / views on underlying usage policies to be enhanced
47+
* ContractReference Constraint or configuration of policies specific to one partner only has notnot implemented
48+
--> clarification of potential reference to "PURIS standard contract" and enabling of ContractReference for 24.08.
49+
* unclear meaning of different stati in negotations
50+
--> add view of successfull contract agreeements wrt which data have been closed
51+
* current logging only done on info level
52+
--> enhance logging of policies (currently only available at debug level)
53+
* in case of non-matching policies (tested in various scenarios) no negotiation takes place
54+
--> enhance visualization or specific Error message to user
55+
* no validation of the Schema "profile": "cx-policy:profile2405" (required to ensure interop with other PURIS apps)
56+
57+
#### Styleguide
58+
59+
##### Overall
60+
61+
* Brief description at the top of each page describing content would be nice for better user experience.
62+
63+
##### Catalog
64+
65+
* No action possible -> unclear to user when and how user will consume an offer
66+
67+
##### Negotiations
68+
69+
* Add filters for transparency (bpnl, state)
70+
871
## v4.0.0
972

1073
The following Changelog lists the changes. Please refer to the [documentation](docs/README.md) for configuration needs and understanding the concept changes.
@@ -26,6 +89,51 @@ The **need for configuration updates** is **marked bold**.
2689
- Allow 0 values in all reported and most own data to improve application resiliency ([#991](https://github.com/eclipse-tractusx/puris/pull/991))
2790
- Fixed product and material stocks always including values for all materials ([#994](https://github.com/eclipse-tractusx/puris/pull/994))
2891

92+
### Known Knowns
93+
94+
#### Running With Shared DTR and EDC
95+
96+
PURIS FOSS may not be run on a shared DTR and EDC with full scope. See [Admin Guide](docs/admin/Admin_Guide.md#running-the-puris-foss-application-on-shared-enablement-services) for more information of possible scenarios.
97+
98+
#### Upgradeability
99+
100+
Data base migrations are performed but assets.
101+
102+
#### Data Sovereignty
103+
104+
For productive use the following enhancements are encouraged
105+
106+
* User FrontEnd available: Role Company Admin is able to query catalogue and see negotiations and transfers But company rules / policies need to be configured upfront in backend (via postman) to enable automatic contract negotiations, responsibility lies with Company Admin role
107+
--> add section in the User Manual describing this and the (legal) importance and responsibility behind defining these rules
108+
* Currently only one standard policy per reg. connector / customer instance is supported (more precisely one for DTR, one for all submodels), negotiation happens automatically based on this
109+
--> enhance option to select partner and define specific policies (to be planned in context of BPDM Integration)
110+
--> UI for specific configuration by dedicated role (e.g. Comp Admin) and more flexible policy configuration (withoutv code changes) is needed
111+
* As a non-Admin user I do not have ability to view policies in detail
112+
--> transparency for users when interacting with and requesting / consuming data via dashboard / views on underlying usage policies to be enhanced
113+
* ContractReference Constraint or configuration of policies specific to one partner only has notnot implemented
114+
--> clarification of potential reference to "PURIS standard contract" and enabling of ContractReference for 24.08.
115+
* unclear meaning of different stati in negotations
116+
--> add view of successfull contract agreeements wrt which data have been closed
117+
* current logging only done on info level
118+
--> enhance logging of policies (currently only available at debug level)
119+
* in case of non-matching policies (tested in various scenarios) no negotiation takes place
120+
--> enhance visualization or specific Error message to user
121+
* no validation of the Schema "profile": "cx-policy:profile2405" (required to ensure interop with other PURIS apps)
122+
123+
#### Styleguide
124+
125+
##### Overall
126+
127+
* Brief description at the top of each page describing content would be nice for better user experience.
128+
129+
##### Catalog
130+
131+
* No action possible -> unclear to user when and how user will consume an offer
132+
133+
##### Negotiations
134+
135+
* Add filters for transparency (bpnl, state)
136+
29137
## v3.4.0
30138

31139
The following Changelog lists the changes. Please refer to the [documentation](docs/README.md) for configuration needs and understanding the concept changes.

backend/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</parent>
3434
<groupId>org.eclipse.tractusx.puris</groupId>
3535
<artifactId>puris-backend</artifactId>
36-
<version>4.0.0</version>
36+
<version>4.0.1</version>
3737
<name>puris-backend</name>
3838
<description>PURIS Backend</description>
3939
<properties>

backend/puris-backend.iml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module version="4">
3+
<component name="AdditionalModuleElements">
4+
<content url="file://$MODULE_DIR$" dumb="true">
5+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
6+
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
7+
</content>
8+
</component>
9+
</module>

backend/src/main/java/org/eclipse/tractusx/puris/backend/masterdata/logic/service/PartnerServiceImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import lombok.extern.slf4j.Slf4j;
2626
import org.eclipse.tractusx.puris.backend.common.edc.logic.service.EdcAdapterService;
2727
import org.eclipse.tractusx.puris.backend.common.edc.logic.service.EdcContractMappingService;
28+
import org.eclipse.tractusx.puris.backend.common.util.PatternStore;
2829
import org.eclipse.tractusx.puris.backend.common.util.VariablesService;
2930
import org.eclipse.tractusx.puris.backend.masterdata.domain.model.Partner;
3031
import org.eclipse.tractusx.puris.backend.masterdata.domain.repository.PartnerRepository;
@@ -61,9 +62,9 @@ public class PartnerServiceImpl implements PartnerService {
6162
@Autowired
6263
private EdcContractMappingService edcContractMappingService;
6364

64-
private final Pattern bpnlPattern = Pattern.compile("^BPNL[0-9a-zA-Z]{12}$");
65-
private final Pattern bpnsPattern = Pattern.compile("^BPNS[0-9a-zA-Z]{12}$");
66-
private final Pattern bpnaPattern = Pattern.compile("^BPNA[0-9a-zA-Z]{12}$");
65+
private final Pattern bpnlPattern = PatternStore.BPNL_PATTERN;
66+
private final Pattern bpnsPattern = PatternStore.BPNS_PATTERN;
67+
private final Pattern bpnaPattern = PatternStore.BPNA_PATTERN;
6768

6869
@Override
6970
public Partner create(Partner partner) {

charts/puris/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ dependencies:
3535
# This is the chart version. This version number should be incremented each time you make changes
3636
# to the chart and its templates, including the app version.
3737
# Versions are expected to follow Semantic Versioning (https://semver.org/)
38-
version: 5.0.0
38+
version: 5.0.1
3939

4040
# This is the version number of the application being deployed. This version number should be
4141
# incremented each time you make changes to the application. Versions are not expected to
4242
# follow Semantic Versioning. They should reflect the version the application is using.
4343
# It is recommended to use it with quotes.
44-
appVersion: "4.0.0"
44+
appVersion: "4.0.1"

charts/puris/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# puris
22

3-
![Version: 5.0.0](https://img.shields.io/badge/Version-4.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.0](https://img.shields.io/badge/AppVersion-3.4.1-informational?style=flat-square)
3+
![Version: 5.0.1](https://img.shields.io/badge/Version-5.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.1](https://img.shields.io/badge/AppVersion-4.0.1-informational?style=flat-square)
44

55
A helm chart for Kubernetes deployment of PURIS
66

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "puris-frontend",
33
"description": "Puris frontend",
44
"license": "Apache-2.0",
5-
"version": "4.0.0",
5+
"version": "4.0.1",
66
"type": "module",
77
"scripts": {
88
"dev": "vite --host --mode customer --port 5173",

0 commit comments

Comments
 (0)