Class ConfigurationManager

java.lang.Object
de.iip_ecosphere.platform.configuration.ConfigurationManager

public class ConfigurationManager extends Object
Holds the platform configuration and provides operations on the configuration. The ConfigurationLifecycleDescriptor must be used and executed before.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
    Bridges between EASy progress monitoring and oktoflow (UI) progress notifications.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static AasIvmlMapper
     
    private static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener
     
    private static net.ssehub.easy.producer.core.mgmt.EasyExecutor
     
    private static boolean
     
    private static net.ssehub.easy.basics.progress.BasicProgressObserver
     
     
    private static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Cleans the generation target.
    Returns the global AAS IVML mapper (for AAS lambda functions).
    static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener
    Returns the global AAS operation completed listener (for AAS lambda functions).
    (package private) static net.ssehub.easy.producer.core.mgmt.EasyExecutor
    Returns the executor instance.
    static net.ssehub.easy.varModel.confModel.Configuration
    Returns the IVML configuration.
    private static de.iip_ecosphere.platform.support.logging.Logger
    Returns the logger for this class.
    static net.ssehub.easy.instantiation.core.model.vilTypes.configuration.Configuration
    Returns a VIL configuration.
    private static void
    Lazy initialization of the executor through loading the IVML model.
    static void
    Performs a platform instantiation.
    static void
    instantiate(String startRuleName)
    Performs a platform instantiation.
    static void
    Reloads the model.
    static void
    Defines the global AAS IVML mapper (for AAS lambda functions).
    static void
    setAasOperationCompletedListener(de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener listener)
    Defines the global AAS operation completed listener (for AAS lambda functions).
    (package private) static void
    setExecutor(net.ssehub.easy.producer.core.mgmt.EasyExecutor instance)
    Defines the executor instance.
    (package private) static void
    setStandalone(boolean isStandalone)
    Defines whether the hosting process is running as part of an installed platform (requiring transport, e.g., for status notifications) or standalone, e.g., in a build process.
    static de.iip_ecosphere.platform.support.TaskRegistry.TaskData
    setTaskData(de.iip_ecosphere.platform.support.TaskRegistry.TaskData taskData)
    Defines the task data to not rely on Easy notifications which may come from a different thread.
    static void
    Sets up container properties for local deployment.
    static net.ssehub.easy.reasoning.core.reasoner.ReasoningResult
    Validates the model and propagates values within the model.
    static net.ssehub.easy.reasoning.core.reasoner.ReasoningResult
    validateAndPropagate(Predicate<net.ssehub.easy.varModel.model.Project> projectFilter)
    Validates the model and propagates values within the model.

    Methods inherited from class java.lang.Object

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

    • executor

      private static net.ssehub.easy.producer.core.mgmt.EasyExecutor executor
    • initialized

      private static boolean initialized
    • observer

      private static net.ssehub.easy.basics.progress.BasicProgressObserver observer
    • aasIvmlMapper

      private static AasIvmlMapper aasIvmlMapper
    • aasOpListener

      private static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener aasOpListener
    • standalone

      private static boolean standalone
    • progressMonitor

      private static ConfigurationManager.OktoProgressMonitor progressMonitor
  • Constructor Details

    • ConfigurationManager

      public ConfigurationManager()
  • Method Details

    • setTaskData

      public static de.iip_ecosphere.platform.support.TaskRegistry.TaskData setTaskData(de.iip_ecosphere.platform.support.TaskRegistry.TaskData taskData)
      Defines the task data to not rely on Easy notifications which may come from a different thread.
      Parameters:
      taskData - the task data, may be null for none/clearing data
      Returns:
      the current task data object before the call, may be null for none
    • setExecutor

      static void setExecutor(net.ssehub.easy.producer.core.mgmt.EasyExecutor instance)
      Defines the executor instance. Called from ConfigurationLifecycleDescriptor.
      Parameters:
      instance - the executor instance
    • setStandalone

      static void setStandalone(boolean isStandalone)
      Defines whether the hosting process is running as part of an installed platform (requiring transport, e.g., for status notifications) or standalone, e.g., in a build process.
      Parameters:
      isStandalone - true if we run standalone, false for platorm process (the default)
    • getExecutor

      static net.ssehub.easy.producer.core.mgmt.EasyExecutor getExecutor()
      Returns the executor instance.
      Returns:
      the executor instance
    • init

      private static void init()
      Lazy initialization of the executor through loading the IVML model. Assumption: Locations are set before.
    • reload

      public static void reload()
      Reloads the model.
    • getIvmlConfiguration

      public static net.ssehub.easy.varModel.confModel.Configuration getIvmlConfiguration()
      Returns the IVML configuration.
      Returns:
      the configuration
    • setupContainerProperties

      public static void setupContainerProperties()
      Sets up container properties for local deployment.
    • getVilConfiguration

      public static net.ssehub.easy.instantiation.core.model.vilTypes.configuration.Configuration getVilConfiguration()
      Returns a VIL configuration.
      Returns:
      a configuration
    • validateAndPropagate

      public static net.ssehub.easy.reasoning.core.reasoner.ReasoningResult validateAndPropagate()
      Validates the model and propagates values within the model.
      Returns:
      the reasoning result (preliminary)
    • validateAndPropagate

      public static net.ssehub.easy.reasoning.core.reasoner.ReasoningResult validateAndPropagate(Predicate<net.ssehub.easy.varModel.model.Project> projectFilter)
      Validates the model and propagates values within the model.
      Parameters:
      projectFilter - optional filter on projects to reason on, may be null
      Returns:
      the reasoning result (preliminary)
    • cleanGenTarget

      public static void cleanGenTarget() throws ExecutionException
      Cleans the generation target.
      Throws:
      ExecutionException - if cleaning fails for some reason
    • instantiate

      public static void instantiate(String startRuleName) throws ExecutionException
      Performs a platform instantiation.
      Parameters:
      startRuleName - the name of the start rule to execute
      Throws:
      ExecutionException - if the instantiation fails for some reason
    • instantiate

      public static void instantiate() throws ExecutionException
      Performs a platform instantiation.
      Throws:
      ExecutionException - if the instantiation fails for some reason
    • setAasIvmlMapper

      public static void setAasIvmlMapper(AasIvmlMapper mapper)
      Defines the global AAS IVML mapper (for AAS lambda functions).
      Parameters:
      mapper - the mapper instance (ignored if null)
    • getAasIvmlMapper

      public static AasIvmlMapper getAasIvmlMapper()
      Returns the global AAS IVML mapper (for AAS lambda functions).
      Returns:
      the mapper instance
    • setAasOperationCompletedListener

      public static void setAasOperationCompletedListener(de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener listener)
      Defines the global AAS operation completed listener (for AAS lambda functions).
      Parameters:
      listener - the listener
    • getAasOperationCompletedListener

      public static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener getAasOperationCompletedListener()
      Returns the global AAS operation completed listener (for AAS lambda functions).
      Returns:
      the listener (may be null)
    • getLogger

      private static de.iip_ecosphere.platform.support.logging.Logger getLogger()
      Returns the logger for this class.
      Returns:
      the logger instance