java.lang.Object
de.iip_ecosphere.platform.services.environment.spring.YamlSetup

public class YamlSetup extends Object
Reads information from the Spring YAML application setup.
Author:
Holger Eichelberger, SSE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Reads in as YAML file and searches for the Spring definition of the "external" binder.
    static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Reads the default "application.yml" file and searches for the Spring definition of the "external" binder.
    static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Reads in as YAML file and searches for the Spring definition of the "internal" binder.
    static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Reads the default "application.yml" file and searches for the Spring definition of the "internal" binder.
    private static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    getSetup(InputStream in, String binder, String[] args)
    Reads in as YAML file and searches for the Spring definition of binders.
    static void
    Loads the plugin setup if specified, in particular to also disable plugin loading for apps generated/build without plugins.
    private static void
    substArgs(Map<String,Object> setup, String[] args)
    Substitutes values in setup by values in args.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • YamlSetup

      public YamlSetup()
  • Method Details

    • getExternalTransportSetup

      public static de.iip_ecosphere.platform.transport.connectors.TransportSetup getExternalTransportSetup(InputStream in, String[] args)
      Reads in as YAML file and searches for the Spring definition of the "external" binder. Returns, if available the Transport setup from the "external" binder environment.
      Parameters:
      in - the input stream containing the YAML setup
      args - potentially overriding command line arguments
      Returns:
      the transport setup for the "external" binder, may be null for none
    • getExternalTransportSetup

      public static de.iip_ecosphere.platform.transport.connectors.TransportSetup getExternalTransportSetup(String[] args)
      Reads the default "application.yml" file and searches for the Spring definition of the "external" binder. Returns, if available the Transport setup from the "external" binder environment.
      Parameters:
      args - potentially overriding command line arguments
      Returns:
      the transport setup for the "external" binder, may be null for none
      See Also:
      • Starter.getApplicationSetupAsStream()
    • getInternalTransportSetup

      public static de.iip_ecosphere.platform.transport.connectors.TransportSetup getInternalTransportSetup(InputStream in, String[] args)
      Reads in as YAML file and searches for the Spring definition of the "internal" binder. Returns, if available the Transport setup from the "internal" binder environment.
      Parameters:
      in - the input stream containing the YAML setup
      args - potentially overriding command line arguments
      Returns:
      the transport setup for the "internal" binder, may be null for none
    • getInternalTransportSetup

      public static de.iip_ecosphere.platform.transport.connectors.TransportSetup getInternalTransportSetup(String[] args)
      Reads the default "application.yml" file and searches for the Spring definition of the "internal" binder. Returns, if available the Transport setup from the "internal" binder environment.
      Parameters:
      args - potentially overriding command line arguments
      Returns:
      the transport setup for the "internal" binder, may be null for none
      See Also:
      • Starter.getApplicationSetupAsStream()
    • getSetup

      private static de.iip_ecosphere.platform.transport.connectors.TransportSetup getSetup(InputStream in, String binder, String[] args)
      Reads in as YAML file and searches for the Spring definition of binders. Returns, if available the Transport setup from the respective binder environment.
      Parameters:
      in - the input stream containing the YAML setup
      binder - the binder name, usually "internal" or "external" by IIP generation conventions
      args - potentially overriding command line arguments
      Returns:
      the transport setup for the binder, may be null for none
    • loadPluginSetup

      public static void loadPluginSetup(String[] args)
      Loads the plugin setup if specified, in particular to also disable plugin loading for apps generated/build without plugins. Call Yaml.resolveInstance() after loading plugins!
      Parameters:
      args - potentially overriding command line arguments
    • substArgs

      private static void substArgs(Map<String,Object> setup, String[] args)
      Substitutes values in setup by values in args.
      Parameters:
      setup - the setup
      args - the command line arguments