org.refcodes.component.Resetable
, org.refcodes.configuration.ext.console.ArgsParserProperties
, RuntimeProperties
, org.refcodes.configuration.Properties
, org.refcodes.configuration.ResourceProperties
, org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
, org.refcodes.console.ArgsParser
, org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
, org.refcodes.console.RootConditionAccessor
, org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>
, org.refcodes.console.RootConditionAccessor.RootConditionMutator
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator
, org.refcodes.mixin.Dumpable
, org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.NameAccessor.NameMutator
, org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>
, org.refcodes.mixin.SecretAccessor.SecretMutator
, org.refcodes.mixin.TitleAccessor.TitleBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.TitleAccessor.TitleMutator
, org.refcodes.mixin.TypeAccessor<String>
, org.refcodes.structure.CanonicalMap
, org.refcodes.structure.Containable
, org.refcodes.structure.Dictionary<String,String>
, org.refcodes.structure.Keys<String,String>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PropertiesAccessorMixin
public class RuntimePropertiesImpl extends org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties> implements RuntimeProperties
RuntimePropertiesImpl
composite represent command line
properties, system properties as well as environment variables (in that
order) and resource properties.
The RuntimePropertiesImpl
are actually constructed from
ArgsParserProperties
, SystemProperties
,
EnvironmentProperties
and ResourceProperties
instances (in
that precedence).
Add the ResourceProperties
via the following methods
RuntimeProperties.withFile(File)
, RuntimeProperties.withFilePath(String)
, RuntimeProperties.withUrl(URL)
or RuntimeProperties.withInputStream(InputStream)
.
Obfuscation may be applied to the properties as of the
ObfuscationProperties
and ObfuscationProperties.ObfuscationPropertiesBuilder
types.org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
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.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
org.refcodes.configuration.ResourceProperties.MutableResoureProperties, org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder
org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B extends org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B>>, org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionProperty
DELIMITERS
Constructor | Description |
---|---|
RuntimePropertiesImpl() |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments. |
RuntimePropertiesImpl(String aSecret) |
Constructs a
RuntimeProperties instance with a custom secret for
obfuscation. |
RuntimePropertiesImpl(String[] aArgs) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(String[] aArgs,
String aSecret) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(String[] aArgs,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
String aSecret) |
Constructs a
RuntimeProperties instance with a custom secret for
obfuscation. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
String[] aArgs) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
String[] aArgs,
String aSecret) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
String[] aArgs,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs a
RuntimeProperties instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition ), no syntax validation is
done. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
org.refcodes.console.Condition aRootCondition) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
org.refcodes.console.Condition aRootCondition,
String aSecret) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
org.refcodes.console.Condition aRootCondition,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs the
RuntimeProperties with the given obfuscation mode |
RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition,
String aSecret) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition,
org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs a
RuntimeProperties instance with the given
Condition used to parse command line arguments. |
RuntimePropertiesImpl(org.refcodes.runtime.SystemContext aObfuscationMode) |
Constructs the
RuntimeProperties with the given obfuscation mode |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addProperties(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Reads the
ResourceProperties.ResourcePropertiesBuilder from the given data sink. |
protected void |
addProperties(InputStream aInputStream,
char[] aDelimiters) |
Reads the
ResourceProperties from the given data sink. |
protected void |
addProperties(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Reads the
ResourceProperties.ResourcePropertiesBuilder from the given data sink. |
protected void |
addProperties(URL aUrl,
char... aDelimiters) |
Reads the
ResourceProperties from the given data sink. |
protected void |
addProperties(org.refcodes.configuration.Properties aProperties) |
|
org.refcodes.configuration.Properties |
childrenOf(String aParentPath) |
|
boolean |
containsKey(Object aKey) |
|
void |
errorLn(String aLine) |
|
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String[] aArgs) |
|
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String aToPath,
String[] aArgs) |
|
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String aToPath,
List<String> aArgs) |
|
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(List<String> aArgs) |
|
String |
get(Object aKey) |
|
char |
getDelimiter() |
|
protected org.refcodes.configuration.Properties |
getProperties() |
|
org.refcodes.console.Condition |
getRootCondition() |
|
boolean |
isEmpty() |
|
Set<String> |
keySet() |
|
void |
printBanner() |
|
void |
printCopyrightNote() |
|
void |
printDescription() |
|
void |
printHelp() |
|
void |
printLicenseNote() |
|
void |
printLn() |
|
void |
printLn(String aLine) |
|
void |
printOptions() |
|
void |
printSeparatorLn() |
|
void |
printUsage() |
|
org.refcodes.configuration.Properties |
reload() |
|
org.refcodes.configuration.Properties |
reload(org.refcodes.configuration.ReloadMode aReloadMode) |
|
void |
reset() |
|
org.refcodes.configuration.Properties |
retrieveFrom(String aFromPath) |
|
org.refcodes.configuration.Properties |
retrieveTo(String aToPath) |
|
void |
setBannerFont(org.refcodes.textual.Font aBannerFont) |
|
void |
setBannerFontPalette(char[] aColorPalette) |
|
void |
setConsoleWidth(int aConsoleWidth) |
|
void |
setCopyrightNote(String aCopyrightNote) |
|
void |
setDescription(String aDescription) |
|
void |
setErrorOut(PrintStream aErrorOut) |
|
void |
setLicenseNote(String aLicenseNote) |
|
void |
setLineBreak(String aLineBreak) |
|
void |
setMaxConsoleWidth(int aMaxConsoleWidth) |
|
void |
setName(String aName) |
|
void |
setObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode) |
Specifies the obfuscation mode to be used.
|
void |
setRootCondition(org.refcodes.console.Condition aRootCondition) |
|
void |
setSecret(String aSecret) |
|
void |
setSeparatorChar(char aSeparatorChar) |
|
void |
setStandardOut(PrintStream aStandardOut) |
|
void |
setSyntaxNotation(org.refcodes.console.SyntaxNotation aSyntaxNotation) |
|
void |
setTitle(String aTitle) |
|
void |
setUsageLabel(String aUsageLabel) |
|
int |
size() |
|
Object |
toDataStructure(String aFromPath) |
|
Collection<String> |
values() |
|
RuntimeProperties |
withFile(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
|
RuntimeProperties |
withFilePath(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
|
RuntimeProperties |
withInputStream(InputStream aInputStream,
char... aDelimiters) |
|
RuntimeProperties |
withParseArgs(String[] aArgs) |
|
RuntimeProperties |
withProperties(org.refcodes.configuration.Properties aProperties) |
A hook for you to provide
Properties programmatically. |
RuntimeProperties |
withUrl(URL aUrl,
char... aDelimiters) |
toInstance, toInstance, toType, toType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
containsValue, getType, retrieve, toMap, toProperties, toPropertyPath
containsKey, 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, useShort
withFile, withFilePath, withFilePath, withFilePath
withBannerFont, withBannerFontPalette, withConsoleWidth, withCopyrightNote, withDescription, withErrorOut, withEvalArgs, withEvalArgs, withEvalArgs, withEvalArgs, withFile, withFile, withFilePath, withFilePath, withInputStream, withLicenseNote, withLineBreak, withMaxConsoleWidth, withName, withObfuscationMode, withParseArgs, withRootCondition, withSecret, withSeparatorChar, withStandardOut, withSyntaxNotation, withTitle, withUrl, withUsageLabel
public RuntimePropertiesImpl()
RuntimeProperties
instance with no Condition
for parsing command line arguments. As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments when invoking
RuntimeProperties.withEvalArgs(String[])
.public RuntimePropertiesImpl(String[] aArgs)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments.aArgs
- The command line arguments to be evaluated.public RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.public RuntimePropertiesImpl(org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
with the given obfuscation modeaObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(String[] aArgs, org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments. Also constructs the
RuntimeProperties
with the given obfuscation modeaArgs
- The command line arguments to be evaluated.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition, org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments. Also constructs
the RuntimeProperties
with the given obfuscation mode.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(String aSecret)
RuntimeProperties
instance with a custom secret for
obfuscation.aSecret
- The secret to be used when encountering upon obfuscated
properties.public RuntimePropertiesImpl(String[] aArgs, String aSecret)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments. Also constructs a
RuntimeProperties
instance with a custom secret for obfuscation.aArgs
- The command line arguments to be evaluated.aSecret
- The secret to be used when encountering upon obfuscated
properties.public RuntimePropertiesImpl(org.refcodes.console.Condition aRootCondition, String aSecret)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments. Also constructs a
RuntimeProperties
instance with a custom secret for obfuscation.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.aSecret
- The secret to be used when encountering upon obfuscated
properties.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory)
RuntimeProperties
instance with no Condition
for parsing command line arguments. As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments when invoking
RuntimeProperties.withEvalArgs(String[])
.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, String[] aArgs)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aArgs
- The command line arguments to be evaluated.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, org.refcodes.console.Condition aRootCondition)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
with the given obfuscation modeaPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, String[] aArgs, org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments. Also constructs the
RuntimeProperties
with the given obfuscation modeaPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aArgs
- The command line arguments to be evaluated.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, org.refcodes.console.Condition aRootCondition, org.refcodes.runtime.SystemContext aObfuscationMode)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments. Also constructs
the RuntimeProperties
with the given obfuscation mode.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, String aSecret)
RuntimeProperties
instance with a custom secret for
obfuscation.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aSecret
- The secret to be used when encountering upon obfuscated
properties.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, String[] aArgs, String aSecret)
RuntimeProperties
instance with no Condition
for parsing command line arguments: As no syntax notation is required by
the constructor (no root Condition
), no syntax validation is
done. Therefore the properties are heuristically determined from the
provided command line arguments. Also constructs a
RuntimeProperties
instance with a custom secret for obfuscation.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aArgs
- The command line arguments to be evaluated.aSecret
- The secret to be used when encountering upon obfuscated
properties.public RuntimePropertiesImpl(org.refcodes.configuration.PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory aPropertiesBuilderFactory, org.refcodes.console.Condition aRootCondition, String aSecret)
RuntimeProperties
instance with the given
Condition
used to parse command line arguments. Also constructs a
RuntimeProperties
instance with a custom secret for obfuscation.aPropertiesBuilderFactory
- The factory to use when constructing
ResourceProperties
instances.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts. Parse the command line
arguments via evalArgs(String[])
.aSecret
- The secret to be used when encountering upon obfuscated
properties.public void setRootCondition(org.refcodes.console.Condition aRootCondition)
setRootCondition
in interface org.refcodes.console.RootConditionAccessor.RootConditionMutator
public void setSecret(String aSecret)
setSecret
in interface org.refcodes.mixin.SecretAccessor.SecretMutator
public void setObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode)
setObfuscationMode
in interface RuntimeProperties
aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.public RuntimeProperties withProperties(org.refcodes.configuration.Properties aProperties)
Properties
programmatically. The later
you add Properties
, the lower their precedence.withProperties
in interface RuntimeProperties
aProperties
- The Properties
to be added.protected void addProperties(org.refcodes.configuration.Properties aProperties)
public RuntimeProperties withFile(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
withFile
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
public RuntimeProperties withInputStream(InputStream aInputStream, char... aDelimiters) throws IOException, ParseException
withInputStream
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
public RuntimeProperties withFilePath(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
withFilePath
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
public RuntimeProperties withUrl(URL aUrl, char... aDelimiters) throws IOException, ParseException
withUrl
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
public RuntimeProperties withParseArgs(String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withParseArgs
in interface org.refcodes.console.ArgsParser
withParseArgs
in interface org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
withParseArgs
in interface RuntimeProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public void errorLn(String aLine)
errorLn
in interface org.refcodes.console.ArgsParser
public List<? extends org.refcodes.console.Operand<?>> evalArgs(List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
evalArgs
in interface org.refcodes.console.ArgsParser
evalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public List<? extends org.refcodes.console.Operand<?>> evalArgs(String aToPath, List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
evalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public List<? extends org.refcodes.console.Operand<?>> evalArgs(String aToPath, String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
evalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public List<? extends org.refcodes.console.Operand<?>> evalArgs(String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
evalArgs
in interface org.refcodes.console.ArgsParser
evalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public org.refcodes.console.Condition getRootCondition()
getRootCondition
in interface org.refcodes.console.ArgsParser
getRootCondition
in interface org.refcodes.console.RootConditionAccessor
public void printBanner()
printBanner
in interface org.refcodes.console.ArgsParser
public void printCopyrightNote()
printCopyrightNote
in interface org.refcodes.console.ArgsParser
public void printDescription()
printDescription
in interface org.refcodes.console.ArgsParser
public void printHelp()
printHelp
in interface org.refcodes.console.ArgsParser
public void printLicenseNote()
printLicenseNote
in interface org.refcodes.console.ArgsParser
public void printLn()
printLn
in interface org.refcodes.console.ArgsParser
public void printLn(String aLine)
printLn
in interface org.refcodes.console.ArgsParser
public void printOptions()
printOptions
in interface org.refcodes.console.ArgsParser
public void printSeparatorLn()
printSeparatorLn
in interface org.refcodes.console.ArgsParser
public void printUsage()
printUsage
in interface org.refcodes.console.ArgsParser
public void reset()
reset
in interface org.refcodes.component.Resetable
public void setBannerFont(org.refcodes.textual.Font aBannerFont)
setBannerFont
in interface org.refcodes.console.ArgsParser
public void setBannerFontPalette(char[] aColorPalette)
setBannerFontPalette
in interface org.refcodes.console.ArgsParser
public void setConsoleWidth(int aConsoleWidth)
setConsoleWidth
in interface org.refcodes.console.ArgsParser
public void setCopyrightNote(String aCopyrightNote)
setCopyrightNote
in interface org.refcodes.console.ArgsParser
public void setDescription(String aDescription)
setDescription
in interface org.refcodes.mixin.DescriptionAccessor.DescriptionMutator
public void setErrorOut(PrintStream aErrorOut)
setErrorOut
in interface org.refcodes.console.ArgsParser
public void setLicenseNote(String aLicenseNote)
setLicenseNote
in interface org.refcodes.console.ArgsParser
public void setLineBreak(String aLineBreak)
setLineBreak
in interface org.refcodes.console.ArgsParser
public void setMaxConsoleWidth(int aMaxConsoleWidth)
setMaxConsoleWidth
in interface org.refcodes.console.ArgsParser
public void setName(String aName)
setName
in interface org.refcodes.mixin.NameAccessor.NameMutator
public void setSeparatorChar(char aSeparatorChar)
setSeparatorChar
in interface org.refcodes.console.ArgsParser
public void setStandardOut(PrintStream aStandardOut)
setStandardOut
in interface org.refcodes.console.ArgsParser
public void setSyntaxNotation(org.refcodes.console.SyntaxNotation aSyntaxNotation)
setSyntaxNotation
in interface org.refcodes.console.ArgsParser
public void setTitle(String aTitle)
setTitle
in interface org.refcodes.mixin.TitleAccessor.TitleMutator
public void setUsageLabel(String aUsageLabel)
setUsageLabel
in interface org.refcodes.console.ArgsParser
public org.refcodes.configuration.Properties reload() throws IOException, IllegalStateException, ParseException
reload
in interface org.refcodes.configuration.ResourceProperties
IOException
IllegalStateException
ParseException
public org.refcodes.configuration.Properties reload(org.refcodes.configuration.ReloadMode aReloadMode) throws IOException, IllegalStateException, ParseException
reload
in interface org.refcodes.configuration.ResourceProperties
IOException
IllegalStateException
ParseException
public char getDelimiter()
getDelimiter
in interface org.refcodes.mixin.DelimiterAccessor
getDelimiter
in interface org.refcodes.configuration.Properties
getDelimiter
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public int size()
size
in interface org.refcodes.structure.Containable
size
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public boolean containsKey(Object aKey)
public boolean isEmpty()
isEmpty
in interface org.refcodes.structure.Containable
isEmpty
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public Collection<String> values()
public org.refcodes.configuration.Properties retrieveFrom(String aFromPath)
retrieveFrom
in interface org.refcodes.structure.CanonicalMap
retrieveFrom
in interface org.refcodes.structure.PathMap<String>
retrieveFrom
in interface org.refcodes.configuration.Properties
retrieveFrom
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public org.refcodes.configuration.Properties retrieveTo(String aToPath)
retrieveTo
in interface org.refcodes.structure.CanonicalMap
retrieveTo
in interface org.refcodes.structure.PathMap<String>
retrieveTo
in interface org.refcodes.configuration.Properties
retrieveTo
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public org.refcodes.configuration.Properties childrenOf(String aParentPath)
childrenOf
in interface org.refcodes.structure.CanonicalMap
childrenOf
in interface org.refcodes.structure.PathMap<String>
childrenOf
in interface org.refcodes.configuration.Properties
childrenOf
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
public Object toDataStructure(String aFromPath)
toDataStructure
in interface org.refcodes.structure.PathMap<String>
toDataStructure
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
protected org.refcodes.configuration.Properties getProperties()
getProperties
in class org.refcodes.configuration.AbstractPropertiesDecorator<org.refcodes.configuration.Properties>
protected void addProperties(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ResourceProperties.ResourcePropertiesBuilder
from the given data sink.aFile
- The data sink from which to read the
ResourceProperties.ResourcePropertiesBuilder
.aConfigLocator
- The ConfigLocator
specifying where to seek
for properties.aDelimiters
- The delimiters in the properties file to identity a
path delimiter.IOException
- Thrown in case there were problems reading the data
sink.ParseException
- Thrown in case there were problems parsing the
data from the data sink.protected void addProperties(InputStream aInputStream, char[] aDelimiters) throws IOException, ParseException
ResourceProperties
from the given data sink.aInputStream
- The data sink from which to read the
ResourceProperties
.aDelimiters
- The delimiters in the properties file to identity a
path delimiter.IOException
- Thrown in case there were problems reading the data
sink.ParseException
- Thrown in case there were problems parsing the
data from the data sink.protected void addProperties(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ResourceProperties.ResourcePropertiesBuilder
from the given data sink.aResourceClass
- The class which's class loader is to take care of
loading the properties (from inside a JAR).aFilePath
- The data sink from which to read the
ResourceProperties.ResourcePropertiesBuilder
.aConfigLocator
- The ConfigLocator
specifying where to seek
for properties.aDelimiters
- The delimiters in the properties file to identity a
path delimiter.IOException
- Thrown in case there were problems reading the data
sink.ParseException
- Thrown in case there were problems parsing the
data from the data sink.protected void addProperties(URL aUrl, char... aDelimiters) throws IOException, ParseException
ResourceProperties
from the given data sink.aUrl
- The data sink from which to read the
ResourceProperties
.aDelimiters
- The delimiters in the properties file to identity a
path delimiter.IOException
- Thrown in case there were problems reading the data
sink.ParseException
- Thrown in case there were problems parsing the
data from the data sink.Copyright © 2018. All rights reserved.