Class UpdateConfig
-
- All Implemented Interfaces:
public final class UpdateConfigSettings-group for update- and release-tracking: the URL from which the fallback mod-lists are refreshed, the pre-release version-check flag, the old-version used for migrations, and the fallback-list update itself. Saving to disk is delegated to the injected saveToDisk-callback, keeping persistence-orchestration with ApiProperties. Extracted from ApiProperties (refactor Phase 1b); ApiProperties remains the facade through which consumers access these values.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringFALLBACK_UPDATE_URLpublic final static StringUPDATE_URL_KEYpublic final static StringVERSION_CHECK_PRERELEASE_KEYpublic final static StringOLD_VERSION_KEYprivate final BooleanfallbackCheckingForPreReleasesEnabledprivate URLupdateUrlprivate BooleanisCheckingForPreReleasesEnabledprivate final BooleanfallbackUpdated
-
Constructor Summary
Constructors Constructor Description UpdateConfig(PropertyStore store, GenerationConfig generationConfig, Function0<Unit> saveToDisk)
-
Method Summary
Modifier and Type Method Description final BooleangetFallbackCheckingForPreReleasesEnabled()final URLgetUpdateUrl()final UnitsetUpdateUrl(URL value)final BooleanisCheckingForPreReleasesEnabled()final UnitsetCheckingForPreReleasesEnabled(Boolean value)final BooleangetFallbackUpdated()final BooleanupdateFallback()Updates the fallback clientside-mod-list and whitelist from the configured updateUrl, replacing the stored lists when the remote ones differ, and saving to disk via the injected callback when anything changed. final UnitsetOldVersion(String version)Stores the old ServerPackCreator-version used to perform necessary migrations between the old and the current version, and saves to disk. final StringoldVersion()The old ServerPackCreator-version used before updating; empty on a first run. -
-
Constructor Detail
-
UpdateConfig
UpdateConfig(PropertyStore store, GenerationConfig generationConfig, Function0<Unit> saveToDisk)
-
-
Method Detail
-
getFallbackCheckingForPreReleasesEnabled
final Boolean getFallbackCheckingForPreReleasesEnabled()
-
getUpdateUrl
final URL getUpdateUrl()
-
setUpdateUrl
final Unit setUpdateUrl(URL value)
-
isCheckingForPreReleasesEnabled
final Boolean isCheckingForPreReleasesEnabled()
-
setCheckingForPreReleasesEnabled
final Unit setCheckingForPreReleasesEnabled(Boolean value)
-
getFallbackUpdated
final Boolean getFallbackUpdated()
-
updateFallback
final Boolean updateFallback()
Updates the fallback clientside-mod-list and whitelist from the configured updateUrl, replacing the stored lists when the remote ones differ, and saving to disk via the injected callback when anything changed.
-
setOldVersion
final Unit setOldVersion(String version)
Stores the old ServerPackCreator-version used to perform necessary migrations between the old and the current version, and saves to disk.
-
oldVersion
final String oldVersion()
The old ServerPackCreator-version used before updating; empty on a first run.
-
-
-
-