Class SubmodelRepositorySpringApp
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.apps.submodelRepository.SubmodelRepositorySpringApp
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@SpringBootApplication
@Configuration
@ComponentScan(basePackages={"org.eclipse.digitaltwin.basyx","de.iip_ecosphere.platform.support.aas.basyx2.server.apps.security"},
excludeFilters=)
public class SubmodelRepositorySpringApp
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Spring application for serving a submodel repository with spring.
Somehow feature-based composition does not work in here. More investigation needed.
- Author:
- Monika Staciwa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.digitaltwin.basyx.aasrepository.AasRepositoryFactoryReturns the file repository factory instance.private org.springframework.web.reactive.function.client.WebClientcreateWebClient(com.fasterxml.jackson.databind.ObjectMapper mapper) Creates the web client.voidextendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> resolvers) org.springframework.security.web.SecurityFilterChainfilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Defines the security filter chain.static org.eclipse.digitaltwin.basyx.aasservice.backend.AasBackendReturns the AAS backend instance.static org.eclipse.digitaltwin.basyx.core.filerepository.FileRepositoryReturns the file repository instance.org.eclipse.digitaltwin.basyx.submodelrepository.feature.operation.delegation.OperationDelegationgetOperationDelegation(com.fasterxml.jackson.databind.ObjectMapper mapper) Customizes the operation delegation.static org.eclipse.digitaltwin.basyx.submodelrepository.SubmodelRepositorygetSubmodelRepository(org.eclipse.digitaltwin.basyx.submodelrepository.feature.operation.delegation.OperationDelegation operationDelegation, de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc) Returns the submodel repository instance.org.eclipse.digitaltwin.basyx.submodelservice.SubmodelServiceFactoryReturns the submodel service factory.static voidStarts the application.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Field Details
-
kstore
@Autowired(required=false) private de.iip_ecosphere.platform.support.aas.basyx2.common.AssetServerKeyStoreDescriptor kstore -
authDesc
@Autowired(required=false) private de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc
-
-
Constructor Details
-
SubmodelRepositorySpringApp
public SubmodelRepositorySpringApp()
-
-
Method Details
-
main
Starts the application.- Parameters:
args- the command line arguments
-
getOperationDelegation
@Bean public org.eclipse.digitaltwin.basyx.submodelrepository.feature.operation.delegation.OperationDelegation getOperationDelegation(com.fasterxml.jackson.databind.ObjectMapper mapper) Customizes the operation delegation. [Copied]- Parameters:
mapper- the object mapper to customize- Returns:
- the operation delegation instance
-
createWebClient
private org.springframework.web.reactive.function.client.WebClient createWebClient(com.fasterxml.jackson.databind.ObjectMapper mapper) Creates the web client.- Parameters:
mapper- the object mapper to customize- Returns:
- the configured web client
-
getSubmodelRepository
@Bean public static org.eclipse.digitaltwin.basyx.submodelrepository.SubmodelRepository getSubmodelRepository(org.eclipse.digitaltwin.basyx.submodelrepository.feature.operation.delegation.OperationDelegation operationDelegation, @Nullable de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc) Returns the submodel repository instance.- Parameters:
operationDelegation- the configured/created operation delegation instanceauthDesc- the actual authentication descriptor- Returns:
- the instance
-
getAasBackend
@Bean public static org.eclipse.digitaltwin.basyx.aasservice.backend.AasBackend getAasBackend()Returns the AAS backend instance.- Returns:
- the instance
-
getFileRepository
@Bean public static org.eclipse.digitaltwin.basyx.core.filerepository.FileRepository getFileRepository()Returns the file repository instance.- Returns:
- the instance
-
aasRepositoryFactory
@Bean public org.eclipse.digitaltwin.basyx.aasrepository.AasRepositoryFactory aasRepositoryFactory()Returns the file repository factory instance.- Returns:
- the instance
-
getSubmodelServiceFactory
@Bean @Lazy public org.eclipse.digitaltwin.basyx.submodelservice.SubmodelServiceFactory getSubmodelServiceFactory()Returns the submodel service factory.- Returns:
- the instance
-
filterChain
@Profile("test") @Bean public org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception Defines the security filter chain.- Parameters:
http- the security instance- Returns:
- the filterchain
- Throws:
Exception- if something fails
-
extendHandlerExceptionResolvers
public void extendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> resolvers) - Specified by:
extendHandlerExceptionResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-