public final class SettingsManagerBuilder extends Object
SettingsManager instances.| Modifier and Type | Method and Description |
|---|---|
@NotNull SettingsManagerBuilder |
configurationData(Class<? extends SettingsHolder>... classes)
Sets up configuration data with the input of the given settings holder classes.
|
@NotNull SettingsManagerBuilder |
configurationData(@NotNull ConfigurationData configurationData)
Sets the provided configuration data to the builder.
|
@NotNull SettingsManager |
create()
Creates a settings manager instance.
|
@NotNull SettingsManagerBuilder |
migrationService(@Nullable MigrationService migrationService)
Sets the given migration service to the builder.
|
@NotNull SettingsManagerBuilder |
useDefaultMigrationService()
Registers the default migration service to the builder, which triggers a rewrite of the
configuration file if a property is missing from it.
|
static @NotNull SettingsManagerBuilder |
withResource(@NotNull PropertyResource resource)
Creates a new builder with the given property resource.
|
static @NotNull SettingsManagerBuilder |
withYamlFile(@NotNull File file)
Creates a builder, using the given YAML file to use as property resource.
|
static @NotNull SettingsManagerBuilder |
withYamlFile(@NotNull File file,
@NotNull YamlFileResourceOptions resourceOptions)
Creates a builder, using the given YAML file to use as property resource with the given options.
|
static @NotNull SettingsManagerBuilder |
withYamlFile(@NotNull Path file)
Creates a builder, using the given YAML file to use as property resource.
|
static @NotNull SettingsManagerBuilder |
withYamlFile(@NotNull Path path,
@NotNull YamlFileResourceOptions resourceOptions)
Creates a builder, using the given YAML file to use as property resource with the given options.
|
@NotNull public static @NotNull SettingsManagerBuilder withYamlFile(@NotNull @NotNull Path file)
file - the yaml file to use@NotNull public static @NotNull SettingsManagerBuilder withYamlFile(@NotNull @NotNull File file)
file - the yaml file to use@NotNull public static @NotNull SettingsManagerBuilder withYamlFile(@NotNull @NotNull Path path, @NotNull @NotNull YamlFileResourceOptions resourceOptions)
path - the yaml file to useresourceOptions - the resource options@NotNull public static @NotNull SettingsManagerBuilder withYamlFile(@NotNull @NotNull File file, @NotNull @NotNull YamlFileResourceOptions resourceOptions)
file - the yaml file to useresourceOptions - the resource options@NotNull public static @NotNull SettingsManagerBuilder withResource(@NotNull @NotNull PropertyResource resource)
resource - the resource to use@SafeVarargs @NotNull public final @NotNull SettingsManagerBuilder configurationData(@NotNull Class<? extends SettingsHolder>... classes)
classes - the settings holder classes@NotNull public @NotNull SettingsManagerBuilder configurationData(@NotNull @NotNull ConfigurationData configurationData)
configurationData - the configuration data@NotNull public @NotNull SettingsManagerBuilder migrationService(@Nullable @Nullable MigrationService migrationService)
migrationService - the migration service to use (or null)@NotNull public @NotNull SettingsManagerBuilder useDefaultMigrationService()
@NotNull public @NotNull SettingsManager create()
Copyright © 2016–2023 The AuthMe Team. All rights reserved.