Module dev.orne.config
Package dev.orne.config
Interface XmlConfigBaseBuilder<S extends XmlConfigBaseBuilder<S>>
- Type Parameters:
S- The concrete type of the builder.
- All Superinterfaces:
ConfigBuilder<S>
- All Known Subinterfaces:
XmlConfigBuilder,XmlMutableConfigBuilder
- All Known Implementing Classes:
XmlConfigBuilderImpl,XmlMutableConfigBuilderImpl
@API(status=STABLE,
since="1.0")
public interface XmlConfigBaseBuilder<S extends XmlConfigBaseBuilder<S>>
extends ConfigBuilder<S>
XML files based configuration base builder.
- Since:
- 1.0
- Version:
- 1.0, 2025-07
- Author:
- (w) Iker Hernaez
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAdds the specified custom properties to the configuration properties.Adds the specified custom properties to the configuration properties.Loads the configuration properties from the specified file.Loads the configuration properties from the specified ClassLoader resource.Loads the configuration properties from the specified URL.Loads the configuration properties from the file in the specified path.withAttributePrefix(@NotEmpty String prefix) Sets the XML attributes references prefix.default SwithEmptyDocument(@NotNull String rootElementName) Creates an empty XML document with the specified root element name as configuration properties container.withEmptyDocument(String namespaceURI, @NotNull String rootElementName) Creates an empty XML document with the specified root element name as configuration properties container.withSeparator(@NotEmpty String separator) Sets the configuration nested properties separator.Methods inherited from interface dev.orne.config.ConfigBuilder
as, build, withDecoder, withDecorator, withEncryption, withOverrideParentProperties, withParent, withParent, withVariableResolution
-
Field Details
-
DEFAULT_SEPARATOR
The default configuration nested properties separator.- See Also:
-
DEFAULT_ATTRIBUTE_PREFIX
The default XML attributes references prefix.- See Also:
-
-
Method Details
-
withSeparator
Sets the configuration nested properties separator.- Parameters:
separator- The configuration nested properties separator.- Returns:
- This instance, for method chaining.
-
withAttributePrefix
Sets the XML attributes references prefix.- Parameters:
prefix- The XML attributes references prefix.- Returns:
- This instance, for method chaining.
-
withEmptyDocument
Creates an empty XML document with the specified root element name as configuration properties container.Note that any XML document loaded through
load()methods must match the same root element name.- Parameters:
rootElementName- The root element name of the XML document to create.- Returns:
- This instance, for method chaining.
-
withEmptyDocument
Creates an empty XML document with the specified root element name as configuration properties container.Note that any XML document loaded through
load()methods must match the same root element name.- Parameters:
namespaceURI- The XML document namespace URI.rootElementName- The root element name of the XML document to create.- 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.
- Parameters:
values- The configuration properties.- Returns:
- This instance, for method chaining.
-
add
Adds the specified custom properties to the configuration properties.Note that an existing document is required to have been created with
withEmptyDocument()orload()methtods, so that the XML document has a root element to contain the properties, and that property keys will be processed with the configured nested properties separator and attribute prefix.- Parameters:
values- The configuration properties to add.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified ClassLoader resource.- Parameters:
path- The ClassLoader resource path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the file in the specified path.- Parameters:
path- The file path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified file.- Parameters:
file- The file to load.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified URL.- Parameters:
url- The URL to load.- Returns:
- This instance, for method chaining.
-