Skip to content

Commit

Permalink
Merge pull request #134 from catenax-ng/release/v1.2.0-backend-refactor
Browse files Browse the repository at this point in the history
[1º] - Release/v1.2.0 backend refactor: Commented and refactored backend
  • Loading branch information
matbmoser authored Oct 30, 2023
2 parents ffe31a1 + 5f520af commit ca13a9d
Show file tree
Hide file tree
Showing 99 changed files with 5,963 additions and 1,772 deletions.
2 changes: 1 addition & 1 deletion DEPENDENCIES_FRONTEND
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npm/npmjs/-/browserslist/4.21.4, MIT, approved, #7034
npm/npmjs/-/buffer-crc32/0.2.13, MIT, approved, clearlydefined
npm/npmjs/-/buffer/5.7.1, MIT, approved, clearlydefined
npm/npmjs/-/cachedir/2.3.0, MIT, approved, clearlydefined
npm/npmjs/-/call-bind/1.0.2, MIT, approved, clearlydefined
npm/npmjs/-/call-bind/1.0.2, MIT, approved, #11092
npm/npmjs/-/callforth/0.3.1, MIT, approved, clearlydefined
npm/npmjs/-/callsites/3.1.0, MIT, approved, clearlydefined
npm/npmjs/-/caniuse-lite/1.0.30001449, CC-BY-4.0, approved, #1196
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,26 @@

package org.eclipse.tractusx.productpass;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.media.StringSchema;
import jakarta.servlet.http.HttpServletRequest;
import org.eclipse.tractusx.productpass.models.http.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.info.BuildProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import utils.LogUtil;

import java.util.Map;


/**
* This class is the main class of the Application, where the main method is to start it with Spring boot.
**/
@SpringBootApplication(scanBasePackages={
"utils", "org.eclipse.tractusx.productpass"})
@EnableAsync
Expand All @@ -74,6 +67,7 @@ public static void main(String[] args) {
application.run(args);

}

@Bean
public OpenAPI openApiConfig(){
return new OpenAPI().info(getApiInfo());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

/**
* This class consists exclusively to define the attributes and methods needed for the Application configuration.
**/

@SuppressWarnings("Unused")
@Configuration
public class AppConfig {
@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,69 +28,81 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
* This class consists exclusively to define the attributes and methods needed for the Discovery configuration.
**/
@Configuration
@ConfigurationProperties(prefix="configuration.discovery")
public class DiscoveryConfig {

/** ATTRIBUTES **/
String endpoint;
BPNConfig bpn;
EDCConfig edc;

/** GETTERS AND SETTERS **/
public BPNConfig getBpn() {
return bpn;
}

public void setBpn(BPNConfig bpn) {
this.bpn = bpn;
}

public EDCConfig getEdc() {
return edc;
}

public void setEdc(EDCConfig edc) {
this.edc = edc;
}
public String getEndpoint() {
return endpoint;
}
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}


public static class BPNConfig{
/** INNER CLASSES **/

/**
* This class consists exclusively to define the attributes and methods needed for the BPN configuration.
**/
public static class BPNConfig {

/** ATTRIBUTES **/
String key;
String searchPath;

/** GETTERS AND SETTERS **/
public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}

public String getSearchPath() {
return searchPath;
}

@SuppressWarnings("Unused")
public void setSearchPath(String searchPath) {
this.searchPath = searchPath;
}
}

public static class EDCConfig{
/**
* This class consists exclusively to define the attributes and methods needed for the EDC configuration.
**/
public static class EDCConfig {

/** ATTRIBUTES **/
String key;

/** GETTERS AND SETTERS **/
public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}
}

public String getEndpoint() {
return endpoint;
}

public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}

}
Loading

0 comments on commit ca13a9d

Please sign in to comment.