public interface ProfileProperties extends Properties
ProfileProperties extend the Properties with
Runtime-Profiles support. Properties belonging to provided Runtime-Profiles
overwrite the default properties. Use toRuntimeProfile() to generate
accordingly processed Runtime-Profiles with Runtime-Profiles defined below
the getRuntimeProfilesPath(), which by default is
"/runtime/profiles".
As more than one profile can be evaluated (a preceding profile overwriting
succeeding profile), the getRuntimeProfilesPath() points to an array
with the Runtime-Profiles denoted as follows (assuming "/runtime/profiles"
containing your active Runtime-Profiles):
getRuntimeProfilesPath() defaults to "runtime/profiles" represented
by the path defined by PropertiesPath.RUNTIME_PROFILES_PATH)
In case a value is found at the path "runtime/profiles", this is parsed as a
comma-separated list and converted to an array. The above configuration
therewith may also be written as follows:
runtime/profiles=local,oauth,development
This array beats the above kind of declaration so that the active
Runtime-Profiles can easily be overwritten by ProfileProperties
supporting Java System-Properties (passed to the JVM via "-Dx=y") e.g. the
RuntimePropertiesComposite found in the
refcodes-runtime artifact.
Below find an example on properties with settings for the above
Runtime-Profiles:
toRuntimeProfile() result in the below
default properties:
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ProfileProperties.MutableProfileProperties
The Interface MutableProfileProperties.
|
static interface |
ProfileProperties.ProfilePropertiesBuilder
The Interface ProfilePropertiesBuilder.
|
Properties.MutableProperties, Properties.PropertiesBuilderorg.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMaporg.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>org.refcodes.structure.Dictionary.MutableDictionary<K,V>org.refcodes.structure.Keys.MutableKeys<K,V>, org.refcodes.structure.Keys.MutableValues<K,V>org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterPropertyorg.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixinDEFAULT_COMMENT| Modifier and Type | Method and Description |
|---|---|
default String[] |
getRuntimeProfiles()
The
getRuntimeProfilesPath() points to an array with the
Runtime-Profiles denoted as follows (pointing to your active
Runtime-Profiles):
runtime/profiles/0=local
runtime/profiles/1=oauth
runtime/profiles/2=development
(getRuntimeProfilesPath() defaults to "runtime/profiles"
represented by the path defined by
PropertiesPath.RUNTIME_PROFILES_PATH)
In case a value is found at the path "runtime/profiles", this is parsed
as a comma-separated list and converted to an array. |
default String |
getRuntimeProfilesPath()
Returns the path which points to your active Runtime-Profiles.
|
default Properties |
toRuntimeProfile()
Evaluates the active Runtime-Profiles as of
getRuntimeProfiles()
and creates the according Properties. |
default Properties |
toRuntimeProfile(String... aProfiles)
Evaluates the provided Runtime-Profiles and creates the according
Properties. |
childrenOf, containsValue, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPathtoInstance, toInstance, toType, toTypedirectories, directories, entries, entries, fromExternalKey, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toRootPathcontainsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShortdefault String getRuntimeProfilesPath()
getRuntimeProfiles() evaluates the path and creates a list of
active Runtime-Profiles. By default, the path points to the path
represented by PropertiesPath.RUNTIME_PROFILES_PATH.default String[] getRuntimeProfiles()
getRuntimeProfilesPath() points to an array with the
Runtime-Profiles denoted as follows (pointing to your active
Runtime-Profiles):
getRuntimeProfilesPath() defaults to "runtime/profiles"
represented by the path defined by
PropertiesPath.RUNTIME_PROFILES_PATH)
In case a value is found at the path "runtime/profiles", this is parsed
as a comma-separated list and converted to an array. The above
configuration therewith may also be written as follows:
runtime/profiles=local,oauth,development
This array beats the above kind of declaration so that the active
Runtime-Profiles can easily be overwritten by ProfileProperties
supporting Java System-Properties (passed to the JVM via "-Dx=y") e.g.
the RuntimePropertiesComposite found in the
refcodes-runtime artifact.getRuntimeProfilesPath().default Properties toRuntimeProfile()
getRuntimeProfiles()
and creates the according Properties.Properties as of the active Runtime-Profiles.default Properties toRuntimeProfile(String... aProfiles)
Properties.aProfiles - the a profilesProperties as of the provided Runtime-Profiles.Copyright © 2018. All rights reserved.