Package pl.edu.icm.unity.engine.api
Interface ServerManagement
-
public interface ServerManagementProvides access to general maintenance operations.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description static StringDB_DUMP_DIRECTORYstatic StringDB_IMPORT_DIRECTORY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FileexportDb(pl.edu.icm.unity.types.basic.DBDumpContentElements content)Exports database contents to a JSON file.voidimportDb(File from)Imports the whole database from a given JSON fileStringloadConfigurationFile(String path)Load configuration filevoidreloadConfig()Reload main configuration file if changedvoidresetDatabase()Removes the whole contents of the database and initializes it from scratch.
-
-
-
Field Detail
-
DB_DUMP_DIRECTORY
static final String DB_DUMP_DIRECTORY
- See Also:
- Constant Field Values
-
DB_IMPORT_DIRECTORY
static final String DB_IMPORT_DIRECTORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
resetDatabase
void resetDatabase() throws pl.edu.icm.unity.exceptions.EngineExceptionRemoves the whole contents of the database and initializes it from scratch.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
exportDb
File exportDb(pl.edu.icm.unity.types.basic.DBDumpContentElements content) throws pl.edu.icm.unity.exceptions.EngineException
Exports database contents to a JSON file.- Parameters:
content- dump content type- Returns:
- the file reference
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
importDb
void importDb(File from) throws pl.edu.icm.unity.exceptions.EngineException
Imports the whole database from a given JSON file- Parameters:
from- file to load data from- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
reloadConfig
void reloadConfig() throws pl.edu.icm.unity.exceptions.EngineExceptionReload main configuration file if changed- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-