java.lang.Object
dev.orne.config.impl.AbstractConfigBuilderImpl<S>
dev.orne.config.impl.AbstractMutableConfigBuilderImpl<JsonMutableConfigBuilder>
dev.orne.config.impl.JsonMutableConfigBuilderImpl
- All Implemented Interfaces:
ConfigBuilder<JsonMutableConfigBuilder>,JsonConfigBaseBuilder<JsonMutableConfigBuilder>,JsonMutableConfigBuilder,MutableConfigBuilder<JsonMutableConfigBuilder>
@API(status=INTERNAL,
since="1.0")
public class JsonMutableConfigBuilderImpl
extends AbstractMutableConfigBuilderImpl<JsonMutableConfigBuilder>
implements JsonMutableConfigBuilder
Implementation of Jackson
ObjectNode based mutable configuration
builder.- Since:
- 1.0
- Version:
- 1.0, 2025-07
- Author:
- (w) Iker Hernaez
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull JsonConfigOptionsThe JSON based configuration options.Fields inherited from class dev.orne.config.impl.AbstractMutableConfigBuilderImpl
mutableOptionsFields inherited from class dev.orne.config.impl.AbstractConfigBuilderImpl
optionsFields inherited from interface dev.orne.config.JsonConfigBaseBuilder
DEFAULT_SEPARATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJsonMutableConfigBuilderImpl(@NotNull ConfigOptions options, @NotNull MutableConfigOptions mutableOptions, @NotNull JsonConfigOptions jsonOptions) Copy constructor. -
Method Summary
Modifier and TypeMethodDescription@NotNull JsonMutableConfigBuilderAdds the specified custom properties to the configuration properties.@NotNull JsonMutableConfigImplbuild()Creates the configuration instance.@NotNull JsonMutableConfigBuilderLoads the configuration properties from the specified file.@NotNull JsonMutableConfigBuilderLoads the configuration properties from the specified ClassLoader resource.@NotNull JsonMutableConfigBuilderLoads the configuration properties from the specified URL.@NotNull JsonMutableConfigBuilderLoads the configuration properties from the file in the specified path.@NotNull JsonMutableConfigBuilderwithSeparator(@NotEmpty String separator) Sets the configuration nested properties separator.Methods inherited from class dev.orne.config.impl.AbstractMutableConfigBuilderImpl
withEncoderMethods inherited from class dev.orne.config.impl.AbstractConfigBuilderImpl
thisBuilder, withDecoder, withDecorator, withEncryption, withOverrideParentProperties, withParent, withVariableResolutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.orne.config.ConfigBuilder
as, withDecoder, withDecorator, withEncryption, withOverrideParentProperties, withParent, withParent, withVariableResolutionMethods inherited from interface dev.orne.config.MutableConfigBuilder
withEncoder
-
Field Details
-
jsonOptions
The JSON based configuration options.
-
-
Constructor Details
-
JsonMutableConfigBuilderImpl
protected JsonMutableConfigBuilderImpl(@NotNull @NotNull ConfigOptions options, @NotNull @NotNull MutableConfigOptions mutableOptions, @NotNull @NotNull JsonConfigOptions jsonOptions) Copy constructor.- Parameters:
options- The configuration options to copy.mutableOptions- The mutable configuration options to copy.jsonOptions- The JSON based configuration options to copy.
-
-
Method Details
-
withSeparator
@NotNull public @NotNull JsonMutableConfigBuilder withSeparator(@NotEmpty @NotEmpty String separator) Sets the configuration nested properties separator.- Specified by:
withSeparatorin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
separator- The configuration nested properties separator.- Returns:
- This instance, for method chaining.
-
add
Adds the specified custom properties to the configuration properties.Note that property keys will be processed with the configured nested properties separator.
- Specified by:
addin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
values- The configuration properties.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified ClassLoader resource.- Specified by:
loadin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
path- The ClassLoader resource path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the file in the specified path.- Specified by:
loadin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
path- The file path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified file.- Specified by:
loadin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
file- The file to load.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified URL.- Specified by:
loadin interfaceJsonConfigBaseBuilder<JsonMutableConfigBuilder>- Parameters:
url- The URL to load.- Returns:
- This instance, for method chaining.
-
build
Creates the configuration instance.- Specified by:
buildin interfaceConfigBuilder<JsonMutableConfigBuilder>- Specified by:
buildin interfaceJsonMutableConfigBuilder- Specified by:
buildin interfaceMutableConfigBuilder<JsonMutableConfigBuilder>- Returns:
- The configuration instance.
-