ru.curs.celesta.AppSettings Maven / Gradle / Ivy
package ru.curs.celesta;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Properties;
import java.util.Set;
/**
* Application settings.
*/
public final class AppSettings extends BaseAppSettings {
private final Set celestaScan;
public AppSettings(Properties properties) {
super(properties);
this.celestaScan = extractCelestaScanFromProperties(properties);
}
public static Set extractCelestaScanFromProperties(Properties properties) {
final String celestaScanProperty = properties.getProperty("celestaScan");
final Set celestaScanVar = new LinkedHashSet<>();
if (celestaScanProperty != null) {
Arrays.stream(celestaScanProperty.split(","))
.map(String::trim)
.forEach(celestaScanVar::add);
}
return Collections.unmodifiableSet(celestaScanVar);
}
public Set getCelestaScan() {
return this.celestaScan;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy