Package pl.edu.icm.unity.engine.api
Interface ServerManagement
-
public interface ServerManagement
Provides access to general maintenance operations.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description static String
DB_DUMP_DIRECTORY
static String
DB_IMPORT_DIRECTORY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description File
exportDb(DBDumpContentElements content)
Exports database contents to a JSON file.void
importDb(File from)
Imports the whole database from a given JSON fileString
loadConfigurationFile(String path)
Load configuration filevoid
reloadConfig()
Reload main configuration file if changedvoid
resetDatabase()
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 EngineException
Removes the whole contents of the database and initializes it from scratch.- Throws:
EngineException
-
exportDb
File exportDb(DBDumpContentElements content) throws EngineException
Exports database contents to a JSON file.- Parameters:
content
- dump content type- Returns:
- the file reference
- Throws:
EngineException
-
importDb
void importDb(File from) throws EngineException
Imports the whole database from a given JSON file- Parameters:
from
- file to load data from- Throws:
EngineException
-
reloadConfig
void reloadConfig() throws EngineException
Reload main configuration file if changed- Throws:
EngineException
-
loadConfigurationFile
String loadConfigurationFile(String path) throws EngineException
Load configuration file- Throws:
EngineException
-
-