-
- All Superinterfaces:
org.refcodes.mixin.AnnotatorAccessor
,org.refcodes.struct.CanonicalMap
,org.refcodes.struct.Containable
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.struct.Dictionary<String,String>
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.EmptyAccessor
,org.refcodes.struct.InterOperableMap<String>
,org.refcodes.struct.Keys<String,String>
,org.refcodes.struct.PathMap<String>
,Properties
,org.refcodes.mixin.TypeAccessor<String>
- All Known Subinterfaces:
ProfileProperties.MutableProfileProperties
,ProfileProperties.ProfilePropertiesBuilder
- All Known Implementing Classes:
ProfilePropertiesDecorator
public interface ProfileProperties extends Properties
TheProfileProperties
extend theProperties
with Runtime-Profiles support. Properties belonging to provided Runtime-Profiles overwrite the default properties. UsetoRuntimeProfile()
to generate accordingly processed Runtime-Profiles with Runtime-Profiles defined below thegetRuntimeProfilesPath()
, which by default is "/runtime/profiles". As more than one profile can be evaluated (a preceding profile overwriting succeeding profile), thegetRuntimeProfilesPath()
points to an array with the Runtime-Profiles denoted as follows (assuming "/runtime/profiles" containing 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 byPropertiesPath.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 byProfileProperties
supporting Java System-Properties (passed to the JVM via "-Dx=y") e.g. theRuntimePropertiesComposite
found in therefcodes-runtime
artifact. Below find an example on properties with settings for the above Runtime-Profiles:- db_url=someStagingDbUrl
- db_user=admin
- security=false
- oauth/security=true
- local/db_user=devops
- local/db_url=someLocalDbUrl
- development/db_user=admin
- development/db_url=someDevelopmentDbUrl
- test/db_user=test
- test/db_url=someTestDbUrl
- db_url=someStagingDbUrl
- db_user=admin
toRuntimeProfile()
result in the below default properties:- /db_url:= someLocalDbUrl
- /db_user:= devops
- /security:= true
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ProfileProperties.MutableProfileProperties
The Interface MutableProfileProperties.static interface
ProfileProperties.ProfilePropertiesBuilder
The Interface ProfilePropertiesBuilder.-
Nested classes/interfaces inherited from interface org.refcodes.mixin.AnnotatorAccessor
org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B extends org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B>>, org.refcodes.mixin.AnnotatorAccessor.AnnotatorMutator, org.refcodes.mixin.AnnotatorAccessor.AnnotatorProperty
-
Nested classes/interfaces inherited from interface org.refcodes.struct.CanonicalMap
org.refcodes.struct.CanonicalMap.CanonicalMapBuilder, org.refcodes.struct.CanonicalMap.MutableCanonicalMap
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
-
Nested classes/interfaces inherited from interface org.refcodes.struct.Dictionary
org.refcodes.struct.Dictionary.MutableDictionary<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.EmptyAccessor
org.refcodes.mixin.EmptyAccessor.EmptyMutator, org.refcodes.mixin.EmptyAccessor.EmptyProperty
-
Nested classes/interfaces inherited from interface org.refcodes.struct.InterOperableMap
org.refcodes.struct.InterOperableMap.InterOperableMapBuilder<T extends Object>, org.refcodes.struct.InterOperableMap.MutableInterOperableMap<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.struct.Keys
org.refcodes.struct.Keys.MutableKeys<K extends Object,V extends Object>, org.refcodes.struct.Keys.MutableValues<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.struct.PathMap
org.refcodes.struct.PathMap.MutablePathMap<T extends Object>, org.refcodes.struct.PathMap.PathMapBuilder<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.properties.Properties
Properties.MutableProperties, Properties.PropertiesBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
-
-
Field Summary
-
Fields inherited from interface org.refcodes.properties.Properties
DEFAULT_COMMENT
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default String[]
getRuntimeProfiles()
ThegetRuntimeProfilesPath()
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 byPropertiesPath.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 ofgetRuntimeProfiles()
and creates the accordingProperties
.default Properties
toRuntimeProfile(String... aProfiles)
Evaluates the provided Runtime-Profiles and creates the accordingProperties
.-
Methods inherited from interface org.refcodes.struct.CanonicalMap
asArray, asArray, asArray, asArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asByteArray, asByteArray, asByteArray, asByteArray, asCharArray, asCharArray, asCharArray, asCharArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asIntArray, asIntArray, asIntArray, asIntArray, asLongArray, asLongArray, asLongArray, asLongArray, asShortArray, asShortArray, asShortArray, asShortArray, queryBetween, toMap, toProperties
-
Methods inherited from interface org.refcodes.struct.InterOperableMap
getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBooleanOr, getBooleanOr, getBooleanOr, getBooleanOr, getBooleanOr, getByte, getByte, getByte, getByte, getByte, getByteOr, getByteOr, getByteOr, getByteOr, getByteOr, getChar, getChar, getChar, getChar, getChar, getCharOr, getCharOr, getCharOr, getCharOr, getCharOr, getClass, getClass, getClass, getClass, getClass, getClassOr, getClassOr, getClassOr, getClassOr, getClassOr, getDouble, getDouble, getDouble, getDouble, getDouble, getDoubleOr, getDoubleOr, getDoubleOr, getDoubleOr, getDoubleOr, getEnum, getEnum, getEnum, getEnum, getEnum, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getEnumOr, getFloat, getFloat, getFloat, getFloat, getFloat, getFloatOr, getFloatOr, getFloatOr, getFloatOr, getFloatOr, getInt, getInt, getInt, getInt, getInt, getIntOr, getIntOr, getIntOr, getIntOr, getIntOr, getLong, getLong, getLong, getLong, getLong, getLongOr, getLongOr, getLongOr, getLongOr, getLongOr, getShort, getShort, getShort, getShort, getShort, getShortOr, getShortOr, getShortOr, getShortOr, getShortOr, getString, getString, getString, getString, getString, getStringOr, getStringOr, getStringOr, getStringOr, getStringOr
-
Methods inherited from interface org.refcodes.struct.Keys
containsKey, get, getOr, keySet, use, values
-
Methods inherited from interface org.refcodes.struct.PathMap
children, children, children, children, children, children, containsKey, containsKey, containsKey, dirs, dirs, dirs, dirs, dirs, dirs, findPaths, fromExternalPath, get, get, get, getArray, getArray, getArray, getArray, getArray, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getRootPath, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, hasChildren, hasChildren, hasChildren, hasChildren, hasChildren, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasParentPath, hasPath, hasPath, hasPath, hasPath, hasSubDirs, hasSubDirs, hasSubDirs, hasSubDirs, hasValue, hasValue, hasValue, hasValue, hasValue, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, isArray, isArray, isArray, isArray, isArray, isArray, isChild, isChild, isChild, isChild, isDir, isDir, isDir, isDir, isDir, isEqualTo, isIndexDir, isIndexDir, isIndexDir, isIndexDir, isIndexDir, isLeaf, isLeaf, isLeaf, isLeaf, isLeaf, isRootPath, keySet, keySet, keySet, keySet, keySet, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, leaves, leaves, leaves, leaves, leaves, leaves, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, paths, paths, paths, paths, paths, paths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, toDataStructure, toDataStructure, toExternalPath, toInstance, toInstance, toLeaf, toMap, toNormalizedPath, toParentPath, toPath, toPath, toPath, toPath, toPathElements, toPathList, toPathStack, toPropertyPath, toType, toType, toType, toType, toType, toType, toType, toType
-
Methods inherited from interface org.refcodes.properties.Properties
containsValue, getAnnotator, getDelimiter, getDir, getDir, getDir, getDir, getDir, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, getType, query, query, query, query, query, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryTo, queryTo, queryTo, queryTo, queryTo, queryTo, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, retrieveTo, retrieveTo
-
-
-
-
Method Detail
-
getRuntimeProfiles
default String[] getRuntimeProfiles()
ThegetRuntimeProfilesPath()
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 byPropertiesPath.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 byProfileProperties
supporting Java System-Properties (passed to the JVM via "-Dx=y") e.g. theRuntimePropertiesComposite
found in therefcodes-runtime
artifact.- Returns:
- Your active Runtime-Profiles defined at the
getRuntimeProfilesPath()
.
-
getRuntimeProfilesPath
default String getRuntimeProfilesPath()
Returns the path which points to your active Runtime-Profiles. The methodgetRuntimeProfiles()
evaluates the path and creates a list of active Runtime-Profiles. By default, the path points to the path represented byPropertiesPath.RUNTIME_PROFILES_PATH
.- Returns:
- The path pointing to your active Runtime-Profiles, defaults to "runtime/profiles".
-
toRuntimeProfile
default Properties toRuntimeProfile()
Evaluates the active Runtime-Profiles as ofgetRuntimeProfiles()
and creates the accordingProperties
.- Returns:
- The
Properties
as of the active Runtime-Profiles.
-
toRuntimeProfile
default Properties toRuntimeProfile(String... aProfiles)
Evaluates the provided Runtime-Profiles and creates the accordingProperties
.- Parameters:
aProfiles
- the profiles- Returns:
- The
Properties
as of the provided Runtime-Profiles.
-
-