-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: gate service and entity structure
- introduced a foreign key relationship between sharing state and business partner - renamed associatedOwnerBpnl to tenantBpnl - simplified the business partner service to be more concise and clear - simplified and split and the golden record task services - introduced an internal output upsert model to make service communication more clear - introduced migration scripts for the above changes
- Loading branch information
Showing
37 changed files
with
1,044 additions
and
658 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
25 changes: 25 additions & 0 deletions
25
.../main/kotlin/org/eclipse/tractusx/bpdm/gate/exception/BpdmMissingSharingStateException.kt
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,25 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.exception | ||
|
||
class BpdmMissingSharingStateException( | ||
externalId: String, | ||
tenantBpnl: String? | ||
) : RuntimeException("Sharing state with external-id '$externalId' in tenant '$tenantBpnl' is missing.") |
34 changes: 34 additions & 0 deletions
34
.../src/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/AlternativeAddress.kt
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,34 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
import com.neovisionaries.i18n.CountryCode | ||
import org.eclipse.tractusx.bpdm.common.model.DeliveryServiceType | ||
|
||
data class AlternativeAddress( | ||
val geographicCoordinates: GeoCoordinate?, | ||
val country: CountryCode, | ||
val administrativeAreaLevel1: String?, | ||
val postalCode: String?, | ||
val city: String, | ||
val deliveryServiceType: DeliveryServiceType, | ||
val deliveryServiceQualifier: String?, | ||
val deliveryServiceNumber: String | ||
) |
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
26 changes: 26 additions & 0 deletions
26
...-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/GeoCoordinate.kt
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,26 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
data class GeoCoordinate( | ||
val longitude: Float, | ||
val latitude: Float, | ||
val altitude: Float? | ||
) |
29 changes: 29 additions & 0 deletions
29
bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/Identifier.kt
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,29 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
import org.eclipse.tractusx.bpdm.common.dto.BusinessPartnerType | ||
|
||
data class Identifier( | ||
val type: String, | ||
val value: String, | ||
val issuingBody: String?, | ||
val businessPartnerType: BusinessPartnerType | ||
) |
45 changes: 45 additions & 0 deletions
45
...te/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/OutputUpsertData.kt
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,45 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
import org.eclipse.tractusx.bpdm.common.dto.AddressType | ||
import org.eclipse.tractusx.bpdm.common.dto.BusinessPartnerRole | ||
|
||
data class OutputUpsertData( | ||
val nameParts: List<String>, | ||
val identifiers: Collection<Identifier>, | ||
val states: Collection<State>, | ||
val roles: Collection<BusinessPartnerRole>, | ||
val isOwnCompanyData: Boolean, | ||
val legalEntityBpn: String, | ||
val legalName: String, | ||
val shortName: String?, | ||
val legalForm: String?, | ||
val siteBpn: String?, | ||
val siteName: String?, | ||
val addressBpn: String, | ||
val addressName: String?, | ||
val addressType: AddressType, | ||
val physicalPostalAddress: PhysicalPostalAddress, | ||
val alternativePostalAddress: AlternativeAddress?, | ||
val legalEntityConfidence: ConfidenceCriteria, | ||
val siteConfidence: ConfidenceCriteria?, | ||
val addressConfidence: ConfidenceCriteria, | ||
) |
39 changes: 39 additions & 0 deletions
39
...c/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/PhysicalPostalAddress.kt
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,39 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
import com.neovisionaries.i18n.CountryCode | ||
|
||
data class PhysicalPostalAddress( | ||
val geographicCoordinates: GeoCoordinate?, | ||
val country: CountryCode, | ||
val administrativeAreaLevel1: String?, | ||
val administrativeAreaLevel2: String?, | ||
val administrativeAreaLevel3: String?, | ||
val postalCode: String?, | ||
val city: String, | ||
val district: String?, | ||
val street: Street?, | ||
val companyPostalCode: String?, | ||
val industrialZone: String?, | ||
val building: String?, | ||
val floor: String?, | ||
val door: String? | ||
) |
31 changes: 31 additions & 0 deletions
31
bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/model/upsert/output/State.kt
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,31 @@ | ||
/******************************************************************************* | ||
* 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.bpdm.gate.model.upsert.output | ||
|
||
import org.eclipse.tractusx.bpdm.common.dto.BusinessPartnerType | ||
import org.eclipse.tractusx.bpdm.common.model.BusinessStateType | ||
import java.time.LocalDateTime | ||
|
||
data class State( | ||
val validFrom: LocalDateTime?, | ||
val validTo: LocalDateTime?, | ||
val type: BusinessStateType, | ||
val businessPartnerType: BusinessPartnerType | ||
) |
Oops, something went wrong.