java.lang.Object
dev.orne.config.impl.XmlConfigOptions
Options of XML based configuration builder.
- Since:
- 1.0
- Version:
- 1.0, 2025-07
- Author:
- (w) Iker Hernaez
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.XmlConfigOptions(@NotNull XmlConfigOptions copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified configuration properties to the configuration properties.@NotBlank StringReturns the XML attributes references prefix.@NotNull DocumentReturns the XML document with the configuration properties.@NotBlank StringReturns the configuration nested properties separator.voidLoads the configuration properties from the specified file.voidload(@NotNull InputStream docIS) Loads the configuration properties from the specifiedInputStream.voidLoads the configuration properties from the specified ClassLoader resource.voidLoads the configuration properties from the specified URL.voidLoads the configuration properties from the file in the specified path.voidsetAttributePrefix(@NotBlank String prefix) Sets the XML attributes references prefix.voidsetPropertySeparator(@NotBlank String separator) Sets the configuration nested properties separator.voidsetRootElement(String namespaceURI, @NotNull String localName) Creates an empty XML document with the specified root element name as configuration properties container.
-
Constructor Details
-
XmlConfigOptions
public XmlConfigOptions()Empty constructor. -
XmlConfigOptions
Copy constructor.- Parameters:
copy- The instance to copy.
-
-
Method Details
-
getDocument
Returns the XML document with the configuration properties.- Returns:
- The XML document with the configuration properties.
-
getPropertySeparator
Returns the configuration nested properties separator.- Returns:
- The configuration nested properties separator.
-
setPropertySeparator
Sets the configuration nested properties separator.- Parameters:
separator- The configuration nested properties separator.
-
getAttributePrefix
Returns the XML attributes references prefix.- Returns:
- The XML attributes references prefix.
-
setAttributePrefix
Sets the XML attributes references prefix.- Parameters:
prefix- The XML attributes references prefix.
-
setRootElement
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, ornullif the XML document does not use namespaces.localName- The root element name of the XML document to create.
-
add
Adds the specified configuration properties to the configuration properties.- Parameters:
values- The configuration properties.
-
load
Loads the configuration properties from the specified ClassLoader resource.- Parameters:
path- The ClassLoader resource path.
-
load
Loads the configuration properties from the file in the specified path.- Parameters:
path- The file path.
-
load
Loads the configuration properties from the specified file.- Parameters:
file- The file to load.
-
load
Loads the configuration properties from the specified URL.- Parameters:
url- The URL to load.
-
load
Loads the configuration properties from the specifiedInputStream.- Parameters:
docIS- The XML document input stream.
-