| Modifier and Type | Method and Description |
|---|---|
protected @NotNull ConfigurationData |
SettingsManagerImpl.getConfigurationData() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull SettingsManagerBuilder |
SettingsManagerBuilder.configurationData(@NotNull ConfigurationData configurationData)
Sets the provided configuration data to the builder.
|
| Constructor and Description |
|---|
SettingsManagerImpl(@NotNull PropertyResource resource,
@NotNull ConfigurationData configurationData,
@Nullable MigrationService migrationService)
Constructor.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ConfigurationDataImpl
Contains information about the available properties and their associated comments.
|
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull ConfigurationData |
ConfigurationDataBuilder.collectData(@NotNull Iterable<Class<? extends SettingsHolder>> classes)
Collects property data and comment info from the given class and creates a configuration data
instance with it.
|
static @NotNull ConfigurationData |
ConfigurationDataBuilder.createConfiguration(Class<? extends SettingsHolder>... classes)
Collects all properties and comment data from the provided classes.
|
static @NotNull ConfigurationData |
ConfigurationDataBuilder.createConfiguration(@NotNull Iterable<Class<? extends SettingsHolder>> classes)
Collects all properties and comment data from the provided classes.
|
static @NotNull ConfigurationData |
ConfigurationDataBuilder.createConfiguration(@NotNull List<? extends Property<?>> properties) |
static @NotNull ConfigurationData |
ConfigurationDataBuilder.createConfiguration(@NotNull List<? extends Property<?>> properties,
@NotNull CommentsConfiguration commentsConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
PlainMigrationService.checkAndMigrate(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData) |
boolean |
MigrationService.checkAndMigrate(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Performs the migration, returning whether a migration has been performed or not.
|
protected boolean |
PlainMigrationService.performMigrations(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Override this method for custom migrations.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
VersionMigrationService.checkAndMigrate(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData) |
void |
VersionMigration.migrate(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Migrates the configuration.
|
protected boolean |
VersionMigrationService.performMigrations(@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Performs the migration by using the versioning system.
|
protected int |
VersionMigrationService.runApplicableMigrations(int readConfigVersion,
@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Runs applicable migrations successively: if a migration is found for the read config version, it is run and its
target version is noted. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
YamlFileResource.createAndAddYamlNode(@NotNull Object exportValue,
@NotNull String path,
@NotNull List<PropertyPathTraverser.PathElement> pathElements,
@NotNull SnakeYamlNodeContainer rootContainer,
@NotNull ConfigurationData configurationData,
@NotNull SnakeYamlNodeBuilder nodeBuilder)
Creates a YAML node for the export value and stores it, along with any comments for intermediate paths that
have not been visited yet.
|
void |
PropertyResource.exportProperties(@NotNull ConfigurationData configurationData)
Exports the provided configuration data to the medium (typically a file).
|
void |
YamlFileResource.exportProperties(@NotNull ConfigurationData configurationData) |
protected @NotNull List<String> |
YamlFileResource.getCommentsForPathElement(@NotNull ConfigurationData configurationData,
@NotNull PropertyPathTraverser.PathElement pathElement) |
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull List<org.yaml.snakeyaml.comments.CommentLine> |
SnakeYamlNodeBuilderImpl.collectComments(@NotNull Object value,
@NotNull String path,
@NotNull ConfigurationData configurationData,
int numberOfNewLines)
Creates comments based on all possible sources (number of empty lines, configuration data,
ValueWithComments) and returns them as SnakeYAML comment lines. |
protected @NotNull org.yaml.snakeyaml.nodes.Node |
SnakeYamlNodeBuilderImpl.createMapNode(@NotNull Map<String,?> value,
String path,
@NotNull ConfigurationData configurationData)
Creates a SnakeYAML node representing a map (collection of key-value pairs).
|
protected @NotNull org.yaml.snakeyaml.nodes.Node |
SnakeYamlNodeBuilderImpl.createSequenceNode(@NotNull Stream<?> entries,
@NotNull String path,
@NotNull ConfigurationData configurationData)
Creates a SnakeYAML node representing a sequence of the entries in the stream.
|
@NotNull org.yaml.snakeyaml.nodes.Node |
SnakeYamlNodeBuilderImpl.createYamlNode(@NotNull Object obj,
@NotNull String path,
@NotNull ConfigurationData configurationData,
int numberOfNewLines) |
@NotNull org.yaml.snakeyaml.nodes.Node |
SnakeYamlNodeBuilder.createYamlNode(@NotNull Object value,
@NotNull String path,
@NotNull ConfigurationData configurationData,
int numberOfNewLines)
Creates a SnakeYAML node representing the given value.
|
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull ConfigurationData |
SettingsHolderClassValidator.createConfigurationData(@NotNull Iterable<Class<? extends SettingsHolder>> classes) |
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
MigrationUtils.moveProperty(@NotNull Property<T> oldProperty,
@NotNull Property<T> newProperty,
@NotNull PropertyReader reader,
@NotNull ConfigurationData configurationData)
Utility method: moves the value of an old property to a new property.
|
void |
SettingsHolderClassValidator.validateCommentLengthsAreWithinBounds(@NotNull ConfigurationData configurationData,
@Nullable Integer minLength,
@Nullable Integer maxLength)
Throws an exception if any comment line in the configuration data has a length is not between the given
minLength and maxLength, inclusive:
minLength <= length <= maxLength. |
void |
SettingsHolderClassValidator.validateConfigurationDataValidForMigrationService(@NotNull ConfigurationData configurationData,
@NotNull PropertyResource resource,
@NotNull MigrationService migrationService)
Validates that the migration service does not declare that a migration is required for the given
configuration data, which gets saved to the provided resource beforehand.
|
void |
SettingsHolderClassValidator.validateHasAllEnumEntriesInComment(@NotNull ConfigurationData configurationData,
@Nullable Predicate<Property<?>> propertyFilter)
Throws an exception if the comments of an enum property do not list all entries of the enum type.
|
void |
SettingsHolderClassValidator.validateHasCommentOnEveryProperty(@NotNull ConfigurationData configurationData,
@Nullable Predicate<Property<?>> propertyFilter)
Throws an exception if there isn't a non-empty comment for every property in the configuration data.
|
Copyright © 2016–2023 The AuthMe Team. All rights reserved.