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/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/Runtime-Profiles" containing your active Runtime-Profiles):
ProfileProperties
supporting Java System-Properties
(passed to the JVM via "-Dx=y") e.g. the RuntimeProperties
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.PropertiesBuilder
CanonicalMap.CanonicalMapBuilder, CanonicalMap.MutableCanonicalMap
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
Dictionary.MutableDictionary<K,V>
Keys.MutableKeys<K,V>, 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.DelimiterProperty
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
PropertiesAccessorMixin.PropertiesMixin, PropertiesAccessorMixin.PropertiesMutatorMixin
Modifier and Type | Field and Description |
---|---|
static String |
RUNTIME_PROFILES_PATH |
DEFAULT_COMMENT
Modifier and Type | Method and Description |
---|---|
default String[] |
getRuntimeProfiles()
The
getRuntimeProfilesPath() points to an array with the
Runtime-Profiles denoted as follows (defaults to
"runtime/Runtime-Profiles" pointing to your active Runtime-Profiles):
runtime/Runtime-Profiles/0=local
runtime/Runtime-Profiles/1=oauth
runtime/Runtime-Profiles/2=development
In case a value is found at the path "runtime/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 ProfileProperties |
retrieve(String aFromPath,
String aToPath)
Retrieve.
|
ProfileProperties |
retrieveFrom(String aFromPath)
Retrieve from.
|
ProfileProperties |
retrieveTo(String aToPath)
Retrieve to.
|
static ProfileProperties |
toProfileProperties()
Creates an
PropertiesBuilder empty instance. |
static ProfileProperties |
toProfileProperties(File aFile)
Loads the properties from the given
File . |
static ProfileProperties |
toProfileProperties(InputStream aInputStream)
Loads the properties from the given
InputStream . |
static ProfileProperties |
toProfileProperties(Map<?,?> aProperties)
Creates a
PropertiesBuilder instance filled with the provided
Properties . |
static ProfileProperties |
toProfileProperties(Properties aProperties)
Creates a
PropertiesBuilder instance filled with the provided
Properties . |
static ProfileProperties |
toProfileProperties(String aFilePath)
Loads the properties from the given
File . |
static ProfileProperties |
toProfileProperties(URL aURL)
Loads the properties from the given
URL . |
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 . |
containsValue, fromProperties, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, toMap, toProperties, toProperties, toProperties, toProperties, toProperties, toProperties, toProperties, toPropertyPath
toType, toType
directories, directories, entries, entries, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toRootPath
containsKey, get, keySet, values
isEmpty, size
get, getBoolean, getBoolean, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort
static final String RUNTIME_PROFILES_PATH
static ProfileProperties toProfileProperties()
PropertiesBuilder
empty instance.ProfileProperties
.static ProfileProperties toProfileProperties(Properties aProperties)
PropertiesBuilder
instance filled with the provided
Properties
.aProperties
- the a propertiesProfileProperties
.static ProfileProperties toProfileProperties(Map<?,?> aProperties)
PropertiesBuilder
instance filled with the provided
Properties
.aProperties
- the a propertiesProfileProperties
.static ProfileProperties toProfileProperties(String aFilePath) throws IOException
File
. Save them using the
method Properties.saveTo(File)
.aFilePath
- The file path from which to load the properties.ProfileProperties
.IOException
- thrown in case loading the properties failedstatic ProfileProperties toProfileProperties(File aFile) throws IOException
File
. Save them using the
method Properties.saveTo(File)
.aFile
- The File
from which to load the properties.ProfileProperties
.IOException
- thrown in case loading the properties failedstatic ProfileProperties toProfileProperties(InputStream aInputStream) throws IOException
InputStream
. Save them using
the method Properties.saveTo(OutputStream)
.aInputStream
- The InputStream
from which to load the
properties.ProfileProperties
.IOException
- thrown in case loading the properties failedstatic ProfileProperties toProfileProperties(URL aURL) throws IOException
URL
.aURL
- The URL
from which to load the properties.ProfileProperties
.IOException
- thrown in case loading the properties faileddefault String getRuntimeProfilesPath()
getRuntimeProfiles()
evaluates the path and creates a list of
active Runtime-Profiles.default String[] getRuntimeProfiles()
getRuntimeProfilesPath()
points to an array with the
Runtime-Profiles denoted as follows (defaults to
"runtime/Runtime-Profiles" pointing to your active Runtime-Profiles):
ProfileProperties
supporting Java
System-Properties (passed to the JVM via "-Dx=y") e.g. the
RuntimeProperties
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.ProfileProperties retrieveFrom(String aFromPath)
retrieveFrom
in interface PathMap<String>
retrieveFrom
in interface Properties
aFromPath
- the a from pathProfileProperties retrieveTo(String aToPath)
retrieveTo
in interface PathMap<String>
retrieveTo
in interface Properties
aToPath
- the a to pathdefault ProfileProperties retrieve(String aFromPath, String aToPath)
retrieve
in interface PathMap<String>
retrieve
in interface Properties
aFromPath
- the a from pathaToPath
- the a to pathCopyright © 2017. All rights reserved.