mirror of https://github.com/micromata/borgbackup-butler.git

WIP
Kai Reinhard
17.09.2021 dbc0a8433134a341f6a359234e62b744f1a9555c
borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/ServerConfiguration.kt
@@ -16,31 +16,18 @@
    /**
     * If true, CrossOriginFilter will be set.
     */
    var isWebDevelopmentMode = WEB_DEVELOPMENT_MODE_PREF_DEFAULT
    var webDevelopmentMode = WEB_DEVELOPMENT_MODE_PREF_DEFAULT
    fun copyFrom(other: ServerConfiguration) {
        super.copyFrom(other)
        port = other.port
        isWebDevelopmentMode = other.isWebDevelopmentMode
        webDevelopmentMode = other.webDevelopmentMode
    }
    companion object {
        val supportedLanguages = arrayOf("en", "de")
        const val WEBSERVER_PORT_DEFAULT = 9042
        private const val WEB_DEVELOPMENT_MODE_PREF_DEFAULT = false
        @JvmStatic
        var applicationHome: String? = null
            get() {
                if (field == null) {
                    field = System.getProperty("applicationHome")
                    if (StringUtils.isBlank(field)) {
                        field = System.getProperty("user.dir")
                        log.info("applicationHome is not given as JVM   parameter. Using current working dir (OK for start in IDE): $field")
                    }
                }
                return field
            }
            private set
        @JvmStatic
        fun get(): ServerConfiguration {