Search in sources :

Example 6 with RuntimeSetting

use of com.tvd12.dahlia.core.setting.RuntimeSetting in project dahlia by youngmonkeys.

the class RuntimeSettingStorage method read.

public RuntimeSetting read() {
    RuntimeSetting setting = null;
    if (Files.exists(filePath)) {
        byte[] bytes = FileReaders.readBytes(filePath);
        setting = settingDeserializer.deserialize(bytes);
    } else {
        setting = new RuntimeSetting();
    }
    return setting;
}
Also used : RuntimeSetting(com.tvd12.dahlia.core.setting.RuntimeSetting)

Aggregations

RuntimeSetting (com.tvd12.dahlia.core.setting.RuntimeSetting)3 Database (com.tvd12.dahlia.core.entity.Database)2 DatabaseSetting (com.tvd12.dahlia.core.setting.DatabaseSetting)2 CollectionStorage (com.tvd12.dahlia.core.storage.CollectionStorage)2 DatabaseStorage (com.tvd12.dahlia.core.storage.DatabaseStorage)2 EzyObject (com.tvd12.ezyfox.entity.EzyObject)2 CommandCreateCollection (com.tvd12.dahlia.core.command.CommandCreateCollection)1 CommandCreateDatabase (com.tvd12.dahlia.core.command.CommandCreateDatabase)1 Collection (com.tvd12.dahlia.core.entity.Collection)1 Databases (com.tvd12.dahlia.core.entity.Databases)1 CollectionFactory (com.tvd12.dahlia.core.factory.CollectionFactory)1 DatabaseFactory (com.tvd12.dahlia.core.factory.DatabaseFactory)1 CollectionSetting (com.tvd12.dahlia.core.setting.CollectionSetting)1 Storage (com.tvd12.dahlia.core.storage.Storage)1 CollectionExistedException (com.tvd12.dahlia.exception.CollectionExistedException)1 DatabaseExistedException (com.tvd12.dahlia.exception.DatabaseExistedException)1 DatabaseNotFoundException (com.tvd12.dahlia.exception.DatabaseNotFoundException)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1