[Minor] Code cleanup
This commit is contained in:
parent
a103864eb8
commit
1e6ac0c042
|
@ -31,6 +31,8 @@ import li.strolch.runtime.configuration.ComponentConfiguration;
|
|||
import li.strolch.runtime.privilege.PrivilegeHandler;
|
||||
import li.strolch.utils.dbc.DBC;
|
||||
|
||||
import static li.strolch.runtime.StrolchConstants.*;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -70,9 +72,9 @@ public class DefaultRealmHandler extends StrolchComponent implements RealmHandle
|
|||
@Override
|
||||
public void setup(ComponentConfiguration configuration) {
|
||||
this.realms = new HashMap<>(1);
|
||||
String[] realms = configuration.getStringArray(PROP_REALMS, StrolchConstants.DEFAULT_REALM);
|
||||
String[] realms = configuration.getStringArray(PROP_REALMS, DEFAULT_REALM);
|
||||
for (String realmName : realms) {
|
||||
String dataStoreModeKey = StrolchConstants.makeRealmKey(realmName, PREFIX_DATA_STORE_MODE);
|
||||
String dataStoreModeKey = makeRealmKey(realmName, PREFIX_DATA_STORE_MODE);
|
||||
String realmMode = configuration.getString(dataStoreModeKey, null);
|
||||
InternalStrolchRealm realm = buildRealm(realmName, realmMode);
|
||||
this.realms.put(realmName, realm);
|
||||
|
|
|
@ -30,6 +30,8 @@ import li.strolch.runtime.configuration.StrolchConfigurationException;
|
|||
import li.strolch.utils.dbc.DBC;
|
||||
import li.strolch.utils.helper.StringHelper;
|
||||
|
||||
import static li.strolch.agent.impl.DefaultRealmHandler.*;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -87,7 +89,7 @@ public class TransientRealm extends InternalStrolchRealm {
|
|||
public void initialize(ComponentContainer container, ComponentConfiguration configuration) {
|
||||
super.initialize(container, configuration);
|
||||
|
||||
String key = StrolchConstants.makeRealmKey(getRealm(), DefaultRealmHandler.PREFIX_DATA_STORE_FILE);
|
||||
String key = StrolchConstants.makeRealmKey(getRealm(), PREFIX_DATA_STORE_FILE);
|
||||
if (!configuration.hasProperty(key)) {
|
||||
String msg = "There is no data store file for realm {0}. Set a property with key {1}";
|
||||
msg = MessageFormat.format(msg, getRealm(), key);
|
||||
|
|
Loading…
Reference in New Issue