Class BaSyxAbstractAasServer.AppConfigurer
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.BaSyxAbstractAasServer.AppConfigurer
- Enclosing class:
BaSyxAbstractAasServer
Supports Spring app configuration.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalProfiles(String... profiles) Adds additional application profiles.Adds an application argument.Adds an application argument as property.addAssetServerKeystore(de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore) Adds a keystore asAssetServerKeyStoreDescriptor.addAuthenticaton(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor auth) Adds an authenticaton descriptor.addBeanRegistrationInitializer(Class<T> cls, T instance) Adds a application initializer that registers a singled bean of typeclswith the giveninstance.addConfigName(String name) Adds the spring configuration (file) name.Adds spring application debugging flags.addInitializer(org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer) Adds a context initializer.Adds Java HTTP client debugging (System property).Adds Java SSL debugging (System property).addKeystore(de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore) Adds a keystore.addPort(int port) Adds the spring tomcat server port.Adds spring security debugging flags.Adds extensive startup bean debugging.Sets up the application testing in oktoflow (profile, disable BaSyx authorization).Adds spring web startup debugging flags.private voidconfigure(org.springframework.boot.SpringApplication app) Configures the givenapp.private String[]getArgs()Returns the arguments for starting a spring application.setBasyxAuthorization(boolean enable) Enables/disables BaSyx authorization.
-
Field Details
-
args
-
profiles
-
initializers
private List<org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>> initializers
-
-
Constructor Details
-
AppConfigurer
protected AppConfigurer()
-
-
Method Details
-
addInitializer
public BaSyxAbstractAasServer.AppConfigurer addInitializer(org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer) Adds a context initializer.- Parameters:
initializer- the initializer instance, may be null for none- Returns:
- this for chaining
-
addBeanRegistrationInitializer
public <T> BaSyxAbstractAasServer.AppConfigurer addBeanRegistrationInitializer(Class<T> cls, T instance) Adds a application initializer that registers a singled bean of typeclswith the giveninstance.- Type Parameters:
T- the type of the bean- Parameters:
cls- the class of the bean representing the typeinstance- the instance to register as bean- Returns:
- this for chaining
-
addPort
Adds the spring tomcat server port.- Parameters:
port- the port- Returns:
- this for chaining
-
addConfigName
Adds the spring configuration (file) name.- Parameters:
name- the name (without extension- Returns:
- this for chaining
-
addDebugging
Adds spring application debugging flags.- Returns:
- this for chaining
-
addJavaSslDebugging
Adds Java SSL debugging (System property).- Returns:
- this for chaining
-
addJavaHttpClientDebugging
Adds Java HTTP client debugging (System property).- Returns:
- this for chaining
-
addArg
Adds an application argument as property.- Parameters:
name- the name of the propertyvalue- the value of the property- Returns:
- this for chaining
-
addArg
Adds an application argument.- Parameters:
arg- the argument- Returns:
- this for chaining
-
addWebStartupDebugging
Adds spring web startup debugging flags.- Returns:
- this for chaining
-
addSpringSecurityDebugging
Adds spring security debugging flags.- Returns:
- this for chaining
-
setBasyxAuthorization
Enables/disables BaSyx authorization.- Parameters:
enable- enable or disable- Returns:
- this for chaining
-
addStartupBeanDebugging
Adds extensive startup bean debugging.- Returns:
- this for chaining
-
addAdditionalProfiles
Adds additional application profiles.- Returns:
- this for chaining
-
addTestingProfile
Sets up the application testing in oktoflow (profile, disable BaSyx authorization).- Returns:
- this for chaining
-
addKeystore
public BaSyxAbstractAasServer.AppConfigurer addKeystore(de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore) Adds a keystore.- Parameters:
kstore- the keystore to be used, may be null- Returns:
- this for chaining
-
addAssetServerKeystore
public BaSyxAbstractAasServer.AppConfigurer addAssetServerKeystore(de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore) Adds a keystore asAssetServerKeyStoreDescriptor.- Parameters:
kstore- the keystore to be used, may be null- Returns:
- this for chaining
-
addAuthenticaton
public BaSyxAbstractAasServer.AppConfigurer addAuthenticaton(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor auth) Adds an authenticaton descriptor.- Parameters:
auth- the authentication descriptor to be used, may be null- Returns:
- this for chaining
-
configure
private void configure(org.springframework.boot.SpringApplication app) Configures the givenapp.- Parameters:
app- the app to configure
-
getArgs
Returns the arguments for starting a spring application.- Returns:
- the arguments
-