All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.curs.celesta.java.AppSettings Maven / Gradle / Ivy

There is a newer version: 6.1.12
Show newest version
package ru.curs.celesta.java;

import ru.curs.celesta.BaseAppSettings;

import java.util.*;

public class AppSettings extends BaseAppSettings {

    private final Set celestaScan;

    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