Class ConfigurationManager
java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.ConfigurationManager
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 ClassesModifier and TypeClassDescriptionprivate static classBridges between EASy progress monitoring and oktoflow (UI) progress notifications. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static AasIvmlMapperprivate static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListenerprivate static net.ssehub.easy.producer.core.mgmt.EasyExecutorprivate static booleanprivate static net.ssehub.easy.basics.progress.BasicProgressObserverprivate static ConfigurationManager.OktoProgressMonitorprivate static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCleans the generation target.static AasIvmlMapperReturns the global AAS IVML mapper (for AAS lambda functions).static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListenerReturns the global AAS operation completed listener (for AAS lambda functions).(package private) static net.ssehub.easy.producer.core.mgmt.EasyExecutorReturns the executor instance.static net.ssehub.easy.varModel.confModel.ConfigurationReturns the IVML configuration.private static de.iip_ecosphere.platform.support.logging.LoggerReturns the logger for this class.static net.ssehub.easy.instantiation.core.model.vilTypes.configuration.ConfigurationReturns a VIL configuration.private static voidinit()Lazy initialization of the executor through loading the IVML model.static voidPerforms a platform instantiation.static voidinstantiate(String startRuleName) Performs a platform instantiation.static voidreload()Reloads the model.static voidsetAasIvmlMapper(AasIvmlMapper mapper) Defines the global AAS IVML mapper (for AAS lambda functions).static voidsetAasOperationCompletedListener(de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener listener) Defines the global AAS operation completed listener (for AAS lambda functions).(package private) static voidsetExecutor(net.ssehub.easy.producer.core.mgmt.EasyExecutor instance) Defines the executor instance.(package private) static voidsetStandalone(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.TaskDatasetTaskData(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 voidSets up container properties for local deployment.static net.ssehub.easy.reasoning.core.reasoner.ReasoningResultValidates the model and propagates values within the model.static net.ssehub.easy.reasoning.core.reasoner.ReasoningResultvalidateAndPropagate(Predicate<net.ssehub.easy.varModel.model.Project> projectFilter) Validates the model and propagates values within the model.
-
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
-
aasOpListener
private static de.iip_ecosphere.platform.support.json.JsonResultWrapper.OperationCompletedListener aasOpListener -
standalone
private static boolean standalone -
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 fromConfigurationLifecycleDescriptor.- 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-trueif we run standalone,falsefor 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
Cleans the generation target.- Throws:
ExecutionException- if cleaning fails for some reason
-
instantiate
Performs a platform instantiation.- Parameters:
startRuleName- the name of the start rule to execute- Throws:
ExecutionException- if the instantiation fails for some reason
-
instantiate
Performs a platform instantiation.- Throws:
ExecutionException- if the instantiation fails for some reason
-
setAasIvmlMapper
Defines the global AAS IVML mapper (for AAS lambda functions).- Parameters:
mapper- the mapper instance (ignored if null)
-
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
-