java.lang.Object
dev.orne.config.impl.AbstractConfig
dev.orne.config.impl.AbstractMutableConfig
dev.orne.config.impl.AbstractWatchableConfig
dev.orne.config.impl.PropertiesConfigImpl
dev.orne.config.impl.PropertiesMutableConfigImpl
- All Implemented Interfaces:
Config,FileMutableConfig,FileWatchableConfig,MutableConfig,WatchableConfig
@API(status=INTERNAL,
since="1.0")
public class PropertiesMutableConfigImpl
extends PropertiesConfigImpl
implements FileWatchableConfig
Properties based mutable configuration.- Since:
- 1.0
- Version:
- 1.0, 2025-04
- Author:
- (w) Iker Hernaez
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.orne.config.WatchableConfig
WatchableConfig.Listener -
Field Summary
Fields inherited from class dev.orne.config.impl.AbstractConfig
KEY_BLANK_ERR -
Constructor Summary
ConstructorsConstructorDescriptionPropertiesMutableConfigImpl(ConfigOptions options, MutableConfigOptions mutableOptions, PropertiesConfigOptions propertyOptions) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(WatchableConfig.Listener listener) Registers the specified configuration change events listener.voidRemoves the specified configuration properties.protected voidRemoves the specified configuration properties.voidremoveListener(WatchableConfig.Listener listener) Unregisters the specified configuration change events listener.voidsave(OutputStream destination) Saves the configuration properties to the specified output stream.voidSaves the configuration properties to the specified writer.voidSets the value of the specified configuration property.protected voidSets the value of the specified configuration property.Methods inherited from class dev.orne.config.impl.PropertiesConfigImpl
containsInt, getInt, getKeysInt, getProperties, isEmptyIntMethods inherited from class dev.orne.config.impl.AbstractWatchableConfig
getEvents, notifyLocalChanges, notifyParentChangesMethods inherited from class dev.orne.config.impl.AbstractMutableConfig
getEncoderMethods inherited from class dev.orne.config.impl.AbstractConfig
contains, get, getDecoder, getDecorator, getKeys, getParent, getResolver, getUndecored, isEmpty, isOverrideParentPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.orne.config.Config
as, contains, get, get, get, getBoolean, getBoolean, getBoolean, getInteger, getInteger, getInteger, getKeys, getKeys, getKeys, getLong, getLong, getLong, getParent, getUndecored, isEmptyMethods inherited from interface dev.orne.config.FileMutableConfig
save, save, saveMethods inherited from interface dev.orne.config.MutableConfig
set, set, setMethods inherited from interface dev.orne.config.WatchableConfig
subset
-
Constructor Details
-
PropertiesMutableConfigImpl
public PropertiesMutableConfigImpl(ConfigOptions options, MutableConfigOptions mutableOptions, PropertiesConfigOptions propertyOptions) Creates a new instance.- Parameters:
options- The configuration builder options.mutableOptions- The mutable configuration builder options.propertyOptions- The properties based configuration builder options.
-
-
Method Details
-
set
Sets the value of the specified configuration property.- Specified by:
setin interfaceMutableConfig- Overrides:
setin classAbstractWatchableConfig- Parameters:
key- The configuration property.value- The value to set- See Also:
-
setInt
Sets the value of the specified configuration property.- Overrides:
setIntin classAbstractMutableConfig- Parameters:
key- The configuration property.value- The value to set
-
remove
Removes the specified configuration properties.- Specified by:
removein interfaceMutableConfig- Overrides:
removein classAbstractWatchableConfig- Parameters:
keys- The configuration properties.- See Also:
-
removeInt
Removes the specified configuration properties.- Overrides:
removeIntin classAbstractMutableConfig- Parameters:
keys- The configuration properties.
-
addListener
Registers the specified configuration change events listener.- Specified by:
addListenerin interfaceWatchableConfig- Overrides:
addListenerin classAbstractWatchableConfig- Parameters:
listener- The listener to be called on configuration changes.- See Also:
-
removeListener
Unregisters the specified configuration change events listener.- Specified by:
removeListenerin interfaceWatchableConfig- Overrides:
removeListenerin classAbstractWatchableConfig- Parameters:
listener- The listener to previously registered.- See Also:
-
save
Saves the configuration properties to the specified output stream. If the file format requires it, the saved content will be encoded using the default encoding (usually UTF-8).- Specified by:
savein interfaceFileMutableConfig- Parameters:
destination- The destination output stream.- Throws:
IOException- If an I/O error occurs.
-
save
Saves the configuration properties to the specified writer.- Specified by:
savein interfaceFileMutableConfig- Parameters:
destination- The destination writer.- Throws:
IOException- If an I/O error occurs.
-