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()Fallback-value for version-checks against pre-releases. final URLgetUpdateUrl()The URL from which a .properties-file is read during updating of the fallback clientside-mods list. final UnitsetUpdateUrl(URL value)The URL from which a .properties-file is read during updating of the fallback clientside-mods list. final BooleanisCheckingForPreReleasesEnabled()Whether the search for available pre-releases is enabled during version-checks. final UnitsetCheckingForPreReleasesEnabled(Boolean value)Whether the search for available pre-releases is enabled during version-checks. final BooleangetFallbackUpdated()Whether the fallback-lists for clientside-mods and whitelisted mods have been updated by the last updateFallback-run. 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()
Fallback-value for version-checks against pre-releases.
-
getUpdateUrl
final URL getUpdateUrl()
The URL from which a .properties-file is read during updating of the fallback clientside-mods list.
-
setUpdateUrl
final Unit setUpdateUrl(URL value)
The URL from which a .properties-file is read during updating of the fallback clientside-mods list.
-
isCheckingForPreReleasesEnabled
final Boolean isCheckingForPreReleasesEnabled()
Whether the search for available pre-releases is enabled during version-checks.
-
setCheckingForPreReleasesEnabled
final Unit setCheckingForPreReleasesEnabled(Boolean value)
Whether the search for available pre-releases is enabled during version-checks.
-
getFallbackUpdated
final Boolean getFallbackUpdated()
Whether the fallback-lists for clientside-mods and whitelisted mods have been updated by the last updateFallback-run.
-
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.
-
-
-
-