Class BaSyxAbstractAasServer.AppConfigurer

java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.BaSyxAbstractAasServer.AppConfigurer
Enclosing class:
BaSyxAbstractAasServer

protected static class BaSyxAbstractAasServer.AppConfigurer extends Object
Supports Spring app configuration.
  • Field Details

    • args

      private List<String> args
    • profiles

      private List<String> 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 type cls with the given instance.
      Type Parameters:
      T - the type of the bean
      Parameters:
      cls - the class of the bean representing the type
      instance - the instance to register as bean
      Returns:
      this for chaining
    • addPort

      public BaSyxAbstractAasServer.AppConfigurer addPort(int port)
      Adds the spring tomcat server port.
      Parameters:
      port - the port
      Returns:
      this for chaining
    • addConfigName

      public BaSyxAbstractAasServer.AppConfigurer addConfigName(String name)
      Adds the spring configuration (file) name.
      Parameters:
      name - the name (without extension
      Returns:
      this for chaining
    • addDebugging

      public BaSyxAbstractAasServer.AppConfigurer addDebugging()
      Adds spring application debugging flags.
      Returns:
      this for chaining
    • addJavaSslDebugging

      public BaSyxAbstractAasServer.AppConfigurer addJavaSslDebugging()
      Adds Java SSL debugging (System property).
      Returns:
      this for chaining
    • addJavaHttpClientDebugging

      public BaSyxAbstractAasServer.AppConfigurer addJavaHttpClientDebugging()
      Adds Java HTTP client debugging (System property).
      Returns:
      this for chaining
    • addArg

      public BaSyxAbstractAasServer.AppConfigurer addArg(String name, String value)
      Adds an application argument as property.
      Parameters:
      name - the name of the property
      value - the value of the property
      Returns:
      this for chaining
    • addArg

      Adds an application argument.
      Parameters:
      arg - the argument
      Returns:
      this for chaining
    • addWebStartupDebugging

      public BaSyxAbstractAasServer.AppConfigurer addWebStartupDebugging()
      Adds spring web startup debugging flags.
      Returns:
      this for chaining
    • addSpringSecurityDebugging

      public BaSyxAbstractAasServer.AppConfigurer addSpringSecurityDebugging()
      Adds spring security debugging flags.
      Returns:
      this for chaining
    • setBasyxAuthorization

      public BaSyxAbstractAasServer.AppConfigurer setBasyxAuthorization(boolean enable)
      Enables/disables BaSyx authorization.
      Parameters:
      enable - enable or disable
      Returns:
      this for chaining
    • addStartupBeanDebugging

      public BaSyxAbstractAasServer.AppConfigurer addStartupBeanDebugging()
      Adds extensive startup bean debugging.
      Returns:
      this for chaining
    • addAdditionalProfiles

      public BaSyxAbstractAasServer.AppConfigurer addAdditionalProfiles(String... profiles)
      Adds additional application profiles.
      Returns:
      this for chaining
    • addTestingProfile

      public BaSyxAbstractAasServer.AppConfigurer 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 as AssetServerKeyStoreDescriptor.
      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 given app.
      Parameters:
      app - the app to configure
    • getArgs

      private String[] getArgs()
      Returns the arguments for starting a spring application.
      Returns:
      the arguments