Module org.refcodes.properties
Package org.refcodes.properties
package org.refcodes.properties
This artifact provides a canonical model for processing properties from
various different formats (
*.yaml
, *.ini
,
*.toml
, *.json
, *.xml
or
*.properties
) and locations (JAR files, file system files,
streams, HTTP resources or GIT repositories) and for converting properties to
and from POJOs (plain java objects) and for applying various transformations
and views to the properties.
Please refer to the refcodes-properties: Managing your application's configuration documentation for an up-to-date and detailed description on the usage of this artifact.
-
ClassDescriptionAbstractPropertiesDecorator<T extends Properties>Decorates the provided
Properties
and delegates method calls to themProperties
.Base class for variousResourceProperties
implementations using aResourceProperties.ResourcePropertiesBuilder
instance under the hood.Implementation of the mutableResourceProperties.ResourcePropertiesBuilder
interface.Decorates the providedResourceProperties
and delegates method calls to themResourceProperties
.TheArgsProperties
takes them command line arguments "as is" and converts them into key/value pairs as of theProperties
semantics.Base exception for the configuration artifact.Extension of theProperties
type overwriting methods in order to access the operating system's environment variables as ofenv
on Linux or Unix shells orset
on Windows machines (e.g."Implementation of theResourceProperties
interface with support of so called "Java properties" (or just "properties").TheJavaProperties.JavaPropertiesFactory
represents aResourcePropertiesFactory
creating instances of typeJavaProperties
.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "Java properties" (or just "properties").TheJavaPropertiesBuilder.JavaPropertiesBuilderFactory
represents aResourcePropertiesFactory.ResourcePropertiesBuilderFactory
creating instances of typeJavaPropertiesBuilder
.Implementation of theResourceProperties
interface with support of so called "JSON properties".TheJsonProperties.JsonPropertiesFactory
represents aResourcePropertiesFactory
creating instances of typeJsonProperties
.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "JSON properties" (or just "properties").TheJsonPropertiesBuilder.JsonPropertiesBuilderFactory
represents aResourcePropertiesFactory.ResourcePropertiesBuilderFactory
creating instances of typeJsonPropertiesBuilder
.TheNormalizedPropertiesDecorator
type decorates aProperties
instance and converts a path delimiter such as the full-stop (".") to theProperties
properties' path delimiter slash ("/", as ofAbstractPropertiesDecorator.getDelimiter()
).Implementation of theResourceProperties
interface with support of so called "PolyglotProperties
" (or just "properties").ThePolyglotProperties.PolyglotPropertiesFactory
is a meta factory using a collection ofResourcePropertiesFactory
instances to deliverResourceProperties
instances.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "PolyglotPropertiesBuilder
" (or just "properties").ThePolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory
is a meta factory using a collection ofResourcePropertiesFactory.ResourcePropertiesBuilderFactory
instances to deliverResourceProperties.ResourcePropertiesBuilder
instances.TheProfileProperties
extend theProperties
with Runtime-Profiles support.The Interface MutableProfileProperties.The Interface ProfilePropertiesBuilder.TheProfilePropertiesDecorator
type decorates aProperties
instance and enriches it with profile support as ofProfileProperties
.TheProfilePropertiesProjection
applies the profiles as ofProfileProperties.getRuntimeProfiles()
onto the encapsulatedProperties
(ProfileProperties
) and provides a view of themProperties
(ProfileProperties
) from the profiles' point of view e.g. as when profiles have been applied to themProperties
(ProfileProperties
).TheProperties
are a https://www.metacodes.proization of theDictionary
.The interfaceProperties.MutableProperties
defines "dirty" methods allowing to modify ("mutate") the properties.The interfaceProperties.PropertiesBuilder
defines builder functionality on top of the properties .Provides an accessor for aProperties
property.Provides a builder method for aProperties
property returning the builder for applying multiple build operations.Provides a mutator for aProperties
property.Provides aProperties
property.The Class PropertiesBuilderImpl.The Class PropertiesImpl.The currently known notations forResourceProperties
implementations.Provides an accessor for aPropertiesNotation
property.PropertiesNotationAccessor.PropertiesNotationBuilder<B extends PropertiesNotationAccessor.PropertiesNotationBuilder<B>>Provides a builder method for aPropertiesNotation
property returning the builder for applying multiple build operations.Provides a mutator for aPropertiesNotation
property.Provides aPropertiesNotation
property.Enumeration representing defined path values.Defines a meta-interface in order to retrieve properties from various different properties sources (Properties
instances) by querying all the herein containedProperties
instances in the order of them being added.The interfacePropertiesPrecedence.MutablePropertiesPrecedence
defines "dirty" methods allowing to modify ("mutate") thePropertiesPrecedence
: Add or removeProperties
inside aPropertiesPrecedence
instance.The interfacePropertiesPrecedence.MutablePropertiesPrecedence
defines builder functionality on top of the properties .Retrieve properties from various different properties sources (Properties
instances) by querying all the herein containedProperties
instances in the order of them being added.Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for the construction ofProperties
precedences usingProfilePropertiesDecorator
,ProfilePropertiesProjection
,ResourceProperties
orPropertiesPrecedenceComposite
(and the like).Mode of operation regarding theResourceProperties.reload(ReloadMode)
method.ResourceLoaderBuilder<B extends ResourceLoaderBuilder<B>>This interface provides builder additions (as of the builder pattern for chained configuring method calls) for "dynamic"ResourceProperties
: AsResourceProperties
are immutable from an interface's point of view, there are no mutating methods provided.TheResourceProperties
are a https://www.metacodes.proization of theDictionary
.The interfaceResourceProperties.MutableResoureProperties
defines "dirty" methods allowing to modify ("mutate") theResourceProperties
.The interfaceResourceProperties.ResourcePropertiesBuilder
defines builder functionality on top of theResourceProperties.MutableResoureProperties
.Factory interface for creatingResourceProperties
instances.Factory interface for creatingResourceProperties.ResourcePropertiesBuilder
instances.TheScheduledResourceProperties
enrichResourceProperties
with scheduling functionality whereby the properties are being automatically reloaded periodically viaResourceProperties.reload(ReloadMode)
.The interfaceScheduledResourceProperties.ScheduledMuableResourceProperties
defines "dirty" methods allowing to modify ("mutate") theScheduledResourceProperties
.The interfaceScheduledResourceProperties.ScheduledResourcePropertiesBuilder
defines builder functionality on top of theScheduledResourceProperties.ScheduledMuableResourceProperties
.TheScheduledResourcePropertiesBuilderDecorator
decoratesResourceProperties.ResourcePropertiesBuilder
from which the properties are to be reloaded periodically viaAbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
.TheScheduledResourcePropertiesDecorator
decoratesResourceProperties
from which the properties are to be reloaded periodically viaAbstractResourcePropertiesDecorator.reload(ReloadMode)
.TheStrictProperties
extends theProperties
with all the getters to throw aKeyNotFoundRuntimeException
instead of returning null in case the key was not found.The Interface MutableStrictProperties.The Interface StrictPropertiesBuilder.TheStrictPropertiesDecorator
type decorates aProperties
instance with all the getters to throw aKeyNotFoundRuntimeException
instead of returning null in case the key was not found.Extension of theProperties
type overwriting methods in order to access system properties as passed via the "-Dkey=value" when launching the JVM (e.g.java -Dconsole.width=220) The keys are transformed to a system properties by removing a prefixed "/" path delimiter (as ofProperties.getDelimiter()
and converting all other path delimiters "/" to the system property's (de facto standard) separator ".".Implementation of theResourceProperties
interface with support of so called "TOML properties".TheTomlProperties.TomlPropertiesFactory
represents aResourcePropertiesFactory
creating instances of typeTomlProperties
.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "TOML properties".TheTomlPropertiesBuilder.TomlPropertiesBuilderFactory
represents aResourcePropertiesFactory.ResourcePropertiesBuilderFactory
creating instances of typeTomlPropertiesBuilder
.Implementation of theResourceProperties
interface with support of so called "XML properties".TheXmlProperties.XmlPropertiesFactory
represents aResourcePropertiesFactory
creating instances of typeXmlProperties
.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "XML properties" (or just "properties").TheXmlPropertiesBuilder.XmlPropertiesBuilderFactory
represents aResourcePropertiesFactory.ResourcePropertiesBuilderFactory
creating instances of typeXmlPropertiesBuilder
.Implementation of theResourceProperties
interface with support of so called "YAML properties".TheYamlProperties.YamlPropertiesFactory
represents aResourcePropertiesFactory
creating instances of typeYamlProperties
.Implementation of theResourceProperties.ResourcePropertiesBuilder
interface with support of so called "YAML properties" (or just "properties").TheYamlPropertiesBuilder.YamlPropertiesBuilderFactory
represents aResourcePropertiesFactory.ResourcePropertiesBuilderFactory
creating instances of typeYamlPropertiesBuilder
.