public class ModuleConfigJsonFile extends Object implements IModuleConfigRepository
Class providing access to the configuration database that is used to persist all modules' configuration.
Modifier and Type | Class and Description |
---|---|
class |
ModuleConfigJsonFile.RuntimeTypeAdapterFactory<T> |
Constructor and Description |
---|
ModuleConfigJsonFile(String moduleConfigPath) |
Modifier and Type | Method and Description |
---|---|
void |
add(ModuleConfig... configList)
Adds a module configuration to the repository
An exception will be thrown if a module with the same id already exist
|
void |
close()
Closes the database and release all resources associated to it
|
boolean |
contains(String moduleID)
Checks if A module with the given ID exists
|
ModuleConfig |
get(String moduleID)
Retrieves the configuration of the module with the given id
|
List<ModuleConfig> |
getAllModulesConfigurations() |
void |
remove(String... moduleIDs)
Removes the module configuration with the given id from the repository
|
void |
update(ModuleConfig... configList)
Updates the module configuration with the given id in the repository
If the id does not exist, the configuration entry is added with the add method
|
public ModuleConfigJsonFile(String moduleConfigPath)
public List<ModuleConfig> getAllModulesConfigurations()
getAllModulesConfigurations
in interface IModuleConfigRepository
public boolean contains(String moduleID)
IModuleConfigRepository
contains
in interface IModuleConfigRepository
public ModuleConfig get(String moduleID)
IModuleConfigRepository
get
in interface IModuleConfigRepository
moduleID
- id of modulepublic void add(ModuleConfig... configList)
IModuleConfigRepository
add
in interface IModuleConfigRepository
public void update(ModuleConfig... configList)
IModuleConfigRepository
update
in interface IModuleConfigRepository
public void remove(String... moduleIDs)
IModuleConfigRepository
remove
in interface IModuleConfigRepository
public void close()
IModuleConfigRepository
close
in interface IModuleConfigRepository
Copyright © 2015 Sensia Software LLC. All rights reserved.