Skip to content

Commit

Permalink
Merge pull request #102 from smartSenseSolutions/feat/2nd-community-d…
Browse files Browse the repository at this point in the history
…ays-contribution-improve-deployability

feat: 2nd community days contributions
  • Loading branch information
stephanbcbauer authored Jul 3, 2024
2 parents d7ed0e8 + 06f95ef commit a74cbf8
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 38 deletions.
10 changes: 8 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The following people have contributed to this repository:
* Pedro Bailão, CGI, https://github.com/Bailonis
* Sérgio Figueiredo, CGI, https://github.com/Ruskyy
* Vinicius Vieira, CGI, https://github.com/viniciusvieirah
* Philipp Mai, BMW, [ClosedSourcerer](https://github.com/ClosedSourcerer)
* Nitin
Vavdiya, [smartSense Solutions](https://smartsensesolutions.com/), [nitin-vavdiya](https://github.com/nitin-vavdiya)
* Richa Ashara, [smartSense Solutions](https://smartsensesolutions.com/), [richaashara](https://github.com/richaashara)
* Ravi
Ghadiya, [smartSense Solutions](https://smartsensesolutions.com/), [ravi-ghadiya](https://github.com/ravi-ghadiya)
* Chirag Yadav, Datafabriq, [Shutstart](https://github.com/shutstart)


Please add yourself to this list, if you contribute to the content.
Please add yourself to this list, if you contribute to the content.
68 changes: 34 additions & 34 deletions DEPENDENCIES_BACKEND
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
maven/mavencentral/ch.qos.logback/logback-classic/1.4.14, EPL-1.0 OR LGPL-2.1-only, approved, #3435
maven/mavencentral/ch.qos.logback/logback-core/1.4.14, EPL-1.0 OR LGPL-2.1-only, approved, #3373
maven/mavencentral/ch.qos.logback/logback-classic/1.4.14, EPL-1.0 AND LGPL-2.1-only, approved, #15230
maven/mavencentral/ch.qos.logback/logback-core/1.4.14, EPL-1.0 AND LGPL-2.1-only, approved, #15209
maven/mavencentral/com.auth0/java-jwt/3.18.1, MIT and Apache-2.0, approved, #10906
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.4, Apache-2.0, approved, #7947
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.4, MIT AND Apache-2.0, approved, #7932
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.4, Apache-2.0, approved, #7934
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.4, Apache-2.0, approved, #9160
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.4, Apache-2.0, approved, #8802
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.4, Apache-2.0, approved, #8808
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.4, Apache-2.0, approved, #7930
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.4, Apache-2.0, approved, #8803
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.4, Apache-2.0, approved, #15260
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.4, , approved, #15194
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.4, Apache-2.0, approved, #15199
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.4, Apache-2.0, approved, #15242
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.4, Apache-2.0, approved, #15207
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.4, Apache-2.0, approved, #15281
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.4, Apache-2.0, approved, #15189
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.4, Apache-2.0, approved, #15219
maven/mavencentral/com.fasterxml.uuid/java-uuid-generator/3.1.5, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.fasterxml/classmate/1.6.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.github.stephenc.jcip/jcip-annotations/1.0-1, Apache-2.0, approved, CQ21949
maven/mavencentral/com.google.code.gson/gson/2.10.1, Apache-2.0, approved, #6159
maven/mavencentral/com.jayway.jsonpath/json-path/2.9.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.24.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #15290
maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310
maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.github.cdimascio/java-dotenv/5.2.2, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -64,43 +64,43 @@ maven/mavencentral/net.minidev/json-smart/2.5.1, Apache-2.0, approved, clearlyde
maven/mavencentral/org.antlr/antlr4-runtime/4.13.0, BSD-3-Clause, approved, #10767
maven/mavencentral/org.apache.commons/commons-lang3/3.14.0, Apache-2.0, approved, #11677
maven/mavencentral/org.apache.logging.log4j/log4j-api/2.21.1, Apache-2.0 AND (Apache-2.0 AND LGPL-2.0-or-later), approved, #11079
maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.21.1, Apache-2.0, approved, #11919
maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.21.1, Apache-2.0, approved, #15262
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.20, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.20, Apache-2.0, approved, #6997
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.20, Apache-2.0, approved, #7920
maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.aspectj/aspectjweaver/1.9.22, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #7695
maven/mavencentral/org.aspectj/aspectjweaver/1.9.22, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #15252
maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161
maven/mavencentral/org.awaitility/awaitility/4.2.1, Apache-2.0, approved, #14178
maven/mavencentral/org.checkerframework/checker-qual/3.31.0, MIT, approved, clearlydefined
maven/mavencentral/org.eclipse.angus/angus-activation/2.0.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.angus
maven/mavencentral/org.eclipse.tractusx.demand-capacity-mgmt-specification/demand-capacity-mgmt-specification/1.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.flywaydb/flyway-core/9.22.3, Apache-2.0, approved, #10349
maven/mavencentral/org.flywaydb/flyway-core/9.22.3, Apache-2.0, approved, #15215
maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/txw2/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined
maven/mavencentral/org.hdrhistogram/HdrHistogram/2.1.12, BSD-2-Clause OR LicenseRef-Public-Domain, approved, CQ13192
maven/mavencentral/org.hdrhistogram/HdrHistogram/2.1.12, CC0-1.0, approved, #15259
maven/mavencentral/org.hibernate.common/hibernate-commons-annotations/6.0.6.Final, LGPL-2.1-only, approved, #6962
maven/mavencentral/org.hibernate.orm/hibernate-core/6.4.4.Final, LGPL-2.1-or-later AND (EPL-2.0 OR BSD-3-Clause) AND MIT, approved, #12490
maven/mavencentral/org.jboss.logging/jboss-logging/3.5.3.Final, Apache-2.0, approved, #9471
maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.23, Apache-2.0, approved, #11827
maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.2, EPL-2.0, approved, #9714
maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.2, EPL-2.0, approved, #9711
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.2, EPL-2.0, approved, #9708
maven/mavencentral/org.junit.jupiter/junit-jupiter/5.10.2, EPL-2.0, approved, #13393
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.2, EPL-2.0, approved, #15250
maven/mavencentral/org.junit.jupiter/junit-jupiter/5.10.2, EPL-2.0, approved, #15197
maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.2, EPL-2.0, approved, #9715
maven/mavencentral/org.junit.platform/junit-platform-engine/1.10.2, EPL-2.0, approved, #9709
maven/mavencentral/org.latencyutils/LatencyUtils/2.0.3, BSD-2-Clause, approved, CQ17408
maven/mavencentral/org.latencyutils/LatencyUtils/2.0.3, CC0-1.0, approved, #15280
maven/mavencentral/org.mockito/mockito-core/5.7.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #11424
maven/mavencentral/org.mockito/mockito-junit-jupiter/5.7.0, MIT, approved, #11423
maven/mavencentral/org.objenesis/objenesis/3.3, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.openapitools/jackson-databind-nullable/0.2.0, Apache-2.0, approved, #3294
maven/mavencentral/org.opentest4j/opentest4j/1.3.0, Apache-2.0, approved, #9713
maven/mavencentral/org.ow2.asm/asm/9.6, BSD-3-Clause, approved, #10776
maven/mavencentral/org.postgresql/postgresql/42.6.2, BSD-2-Clause AND Apache-2.0, approved, #9159
maven/mavencentral/org.projectlombok/lombok/1.18.32, MIT AND LicenseRef-Public-Domain, approved, CQ23907
maven/mavencentral/org.projectlombok/lombok/1.18.32, MIT, approved, #15192
maven/mavencentral/org.reactivestreams/reactive-streams/1.0.4, CC0-1.0, approved, CQ16332
maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.13, MIT, approved, #7698
Expand Down Expand Up @@ -131,29 +131,29 @@ maven/mavencentral/org.springframework.boot/spring-boot-starter/3.2.5, Apache-2.
maven/mavencentral/org.springframework.boot/spring-boot-test-autoconfigure/3.2.5, Apache-2.0, approved, #12920
maven/mavencentral/org.springframework.boot/spring-boot-test/3.2.5, Apache-2.0, approved, #12916
maven/mavencentral/org.springframework.boot/spring-boot/3.2.5, Apache-2.0, approved, #11752
maven/mavencentral/org.springframework.data/spring-data-commons/3.2.5, Apache-2.0, approved, #11917
maven/mavencentral/org.springframework.data/spring-data-jpa/3.2.5, Apache-2.0, approved, #11882
maven/mavencentral/org.springframework.data/spring-data-commons/3.2.5, Apache-2.0, approved, #15202
maven/mavencentral/org.springframework.data/spring-data-jpa/3.2.5, Apache-2.0, approved, #15183
maven/mavencentral/org.springframework.security/spring-security-config/6.2.4, Apache-2.0, approved, #11896
maven/mavencentral/org.springframework.security/spring-security-core/6.2.4, Apache-2.0, approved, #11904
maven/mavencentral/org.springframework.security/spring-security-crypto/6.2.4, Apache-2.0 AND ISC, approved, #11908
maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.2.4, Apache-2.0, approved, #11925
maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.2.4, Apache-2.0, approved, #11893
maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.2.4, Apache-2.0, approved, #11920
maven/mavencentral/org.springframework.security/spring-security-web/6.2.4, Apache-2.0, approved, #11911
maven/mavencentral/org.springframework/spring-aop/6.1.6, Apache-2.0, approved, #11755
maven/mavencentral/org.springframework/spring-aspects/6.1.6, Apache-2.0, approved, #11905
maven/mavencentral/org.springframework/spring-beans/6.1.6, Apache-2.0, approved, #11754
maven/mavencentral/org.springframework/spring-context/6.1.6, Apache-2.0, approved, #11753
maven/mavencentral/org.springframework/spring-core/6.1.6, Apache-2.0 AND BSD-3-Clause, approved, #11750
maven/mavencentral/org.springframework/spring-expression/6.1.6, Apache-2.0, approved, #11747
maven/mavencentral/org.springframework/spring-jcl/6.1.6, Apache-2.0, approved, #11749
maven/mavencentral/org.springframework/spring-jdbc/6.1.6, Apache-2.0, approved, #11897
maven/mavencentral/org.springframework/spring-orm/6.1.6, Apache-2.0, approved, #11924
maven/mavencentral/org.springframework/spring-test/6.1.6, Apache-2.0, approved, #12919
maven/mavencentral/org.springframework/spring-tx/6.1.6, Apache-2.0, approved, #11901
maven/mavencentral/org.springframework/spring-web/6.1.6, Apache-2.0, approved, #11748
maven/mavencentral/org.springframework/spring-aop/6.1.6, Apache-2.0, approved, #15221
maven/mavencentral/org.springframework/spring-aspects/6.1.6, Apache-2.0, approved, #15193
maven/mavencentral/org.springframework/spring-beans/6.1.6, Apache-2.0, approved, #15213
maven/mavencentral/org.springframework/spring-context/6.1.6, Apache-2.0, approved, #15261
maven/mavencentral/org.springframework/spring-core/6.1.6, Apache-2.0 AND BSD-3-Clause, approved, #15206
maven/mavencentral/org.springframework/spring-expression/6.1.6, Apache-2.0, approved, #15264
maven/mavencentral/org.springframework/spring-jcl/6.1.6, Apache-2.0, approved, #15266
maven/mavencentral/org.springframework/spring-jdbc/6.1.6, Apache-2.0, approved, #15191
maven/mavencentral/org.springframework/spring-orm/6.1.6, Apache-2.0, approved, #15278
maven/mavencentral/org.springframework/spring-test/6.1.6, Apache-2.0, approved, #15265
maven/mavencentral/org.springframework/spring-tx/6.1.6, Apache-2.0, approved, #15229
maven/mavencentral/org.springframework/spring-web/6.1.6, Apache-2.0, approved, #15188
maven/mavencentral/org.springframework/spring-webflux/6.1.6, Apache-2.0, approved, #12593
maven/mavencentral/org.springframework/spring-webmvc/6.1.6, Apache-2.0, approved, #11879
maven/mavencentral/org.springframework/spring-webmvc/6.1.6, Apache-2.0, approved, #15182
maven/mavencentral/org.webjars/swagger-ui/5.13.0, Apache-2.0, approved, #14547
maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272
maven/mavencentral/org.yaml/snakeyaml/2.2, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #10232
10 changes: 9 additions & 1 deletion demand-capacity-mgmt-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.109.Final</version>
<scope>runtime</scope>
<classifier>osx-aarch_64</classifier>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* *******************************************************************************
* Copyright (c) 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.demandcapacitymgmt.demandcapacitymgmtbackend.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ProblemDetail;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {

public static final String TIMESTAMP = "timestamp";

/**
* This method is an exception handler for all exceptions that are not explicitly handled elsewhere.
* It catches any exception that occurs in the application and returns a ProblemDetail object.
*
* @param e The exception that occurred.
* @return A ProblemDetail object containing information about the exception.
*/
@ExceptionHandler(Exception.class)
ProblemDetail handleException(Exception e) {
log.error("Error ", e);
String errorMsg = ExceptionUtils.getMessage(e);
ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.INTERNAL_SERVER_ERROR, errorMsg);
problemDetail.setTitle(errorMsg);
problemDetail.setProperty(TIMESTAMP, System.currentTimeMillis());
return problemDetail;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class MaterialDemandEntity {

@ToString.Exclude
@EqualsAndHashCode.Exclude
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@OneToMany(cascade = { CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "material_demand_id")
private List<DemandSeries> demandSeries;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/********************************************************************************
* 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
********************************************************************************/

-- Insert company data

INSERT INTO public.company_base_data
(id, bpn, company_name, street, "number", zip_code, country, my_company, edc_url, counter)
VALUES('415d75e2-bcd3-45d6-8948-36cbb3ff244c'::uuid, 'BPNL0000000009T3', 'CUSTOMER Company A', 'Some address of A', '1', '382355', 'Germany', 'CUSTOMER Company A', NULL, 12);

INSERT INTO public.company_base_data
(id, bpn, company_name, street, "number", zip_code, country, my_company, edc_url, counter)
VALUES('c19bb7fd-4929-46f8-9f84-95eb0baa6125'::uuid, 'BPNL0000000007UH', 'SUPPLIER Company B', 'Some address of B', '4', '382355', 'Germany', 'SUPPLIER Company B', NULL, 0);


-- Insert User data

INSERT INTO public.dcm_users
(id, "name", last_name, email, username, company_id, "role")
VALUES('51d8bd26-e699-4bdc-b453-0422a671631c'::uuid, '', '', '', 'dcm_admin', '415d75e2-bcd3-45d6-8948-36cbb3ff244c'::uuid, 'ADMIN');
INSERT INTO public.dcm_users
(id, "name", last_name, email, username, company_id, "role")
VALUES('fa3911bb-2f27-402b-bf72-e1b4a2064b4e'::uuid, '', '', '', 'supplier', 'c19bb7fd-4929-46f8-9f84-95eb0baa6125'::uuid, 'SUPPLIER');
INSERT INTO public.dcm_users
(id, "name", last_name, email, username, company_id, "role")
VALUES('ef15c278-a1e5-4871-bb99-dd1744de4ec5'::uuid, '', '', '', 'customer', '415d75e2-bcd3-45d6-8948-36cbb3ff244c'::uuid, 'CUSTOMER');

0 comments on commit a74cbf8

Please sign in to comment.