Interface RuntimeProperties

  • All Superinterfaces:
    org.refcodes.console.ArgsParser, org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>, org.refcodes.configuration.ext.console.ArgsParserProperties, org.refcodes.structure.CanonicalMap, org.refcodes.structure.Containable, org.refcodes.mixin.DelimiterAccessor, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.structure.Dictionary<java.lang.String,java.lang.String>, org.refcodes.mixin.Dumpable, org.refcodes.structure.Keys<java.lang.String,java.lang.String>, org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.structure.PathMap<java.lang.String>, org.refcodes.configuration.Properties, org.refcodes.structure.PropertiesAccessorMixin, org.refcodes.component.Resetable, org.refcodes.configuration.ResourceProperties, org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>, org.refcodes.console.RootConditionAccessor, org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>, org.refcodes.console.RootConditionAccessor.RootConditionMutator, 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<java.lang.String>
    All Known Implementing Classes:
    RuntimePropertiesImpl

    public interface RuntimeProperties
    extends org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>, org.refcodes.mixin.SecretAccessor.SecretMutator, org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>, org.refcodes.configuration.ext.console.ArgsParserProperties, org.refcodes.configuration.ResourceProperties, org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
    RuntimeProperties are composed of various Properties flavors such as ArgsParserProperties, SystemProperties, EnvironmentProperties and ResourceProperties with a precedence in this order, encapsulated by a ProfilePropertiesProjection in order for you, the developer, to conveniently harness the power of the Properties functionality. You may also add a Properties instance programmatically to manually provide properties (via withProperties(Properties)). The later you add Properties, the lower their precedence. After construction the use withFile(java.io.File), withUrl(java.net.URL) or the like to load the properties from external resources. After construction use withParseArgs(String[]) or the like to parse the command line arguments (implementations might provide a constructor such as RuntimePropertiesImpl(String[]) for the command line arguments if you do not require a command syntax notation). RuntimeProperties represent a composition of the different Properties flavors, therefore providing functionality from the ArgsParserProperties as well as from the ResourceProperties types.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.structure.CanonicalMap

        org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.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.structure.Dictionary

        org.refcodes.structure.Dictionary.MutableDictionary<K extends java.lang.Object,V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.structure.PathMap

        org.refcodes.structure.PathMap.MutablePathMap<T extends java.lang.Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.configuration.Properties

        org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
      • Nested classes/interfaces inherited from interface org.refcodes.structure.PropertiesAccessorMixin

        org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends java.lang.Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
      • Nested classes/interfaces inherited from interface org.refcodes.configuration.ResourceProperties

        org.refcodes.configuration.ResourceProperties.MutableResoureProperties, org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder
      • Nested classes/interfaces inherited from interface org.refcodes.console.RootConditionAccessor

        org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B extends org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B>>, org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor

        org.refcodes.mixin.TypeAccessor.TypeMutator<T extends java.lang.Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char[] DELIMITERS  
      • Fields inherited from interface org.refcodes.configuration.Properties

        DEFAULT_COMMENT
      • Fields inherited from interface org.refcodes.configuration.ResourceProperties

        VALUE_ATTRIBUTES
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void setObfuscationMode​(org.refcodes.runtime.SystemContext aObfuscationMode)
      Specifies the obfuscation mode to be used.
      default RuntimeProperties withBannerFont​(org.refcodes.textual.Font aBannerFont)
      default RuntimeProperties withBannerFontPalette​(char[] aColorPalette)
      default RuntimeProperties withConsoleWidth​(int aConsoleWidth)
      default RuntimeProperties withCopyrightNote​(java.lang.String aCopyrightNote)
      default RuntimeProperties withDescription​(java.lang.String aDescription)
      default RuntimeProperties withErrorOut​(java.io.PrintStream aErrorOut)
      default RuntimeProperties withEvalArgs​(java.lang.String[] aArgs)
      default RuntimeProperties withEvalArgs​(java.lang.String aToPath, java.lang.String[] aArgs)
      default RuntimeProperties withEvalArgs​(java.lang.String aToPath, java.util.List<java.lang.String> aArgs)
      default RuntimeProperties withEvalArgs​(java.util.List<java.lang.String> aArgs)
      default RuntimeProperties withFile​(java.io.File aFile)
      default RuntimeProperties withFile​(java.io.File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator)
      default RuntimeProperties withFilePath​(java.lang.Class<?> aResourceClass, java.lang.String aFilePath)
      default RuntimeProperties withFilePath​(java.lang.String aFilePath)
      default RuntimeProperties withInputStream​(java.io.InputStream aInputStream)
      default RuntimeProperties withLicenseNote​(java.lang.String aLicenseNote)
      default RuntimeProperties withLineBreak​(java.lang.String aLineBreak)
      default RuntimeProperties withMaxConsoleWidth​(int aMaxConsoleWidth)
      default RuntimeProperties withName​(java.lang.String aName)
      default RuntimeProperties withObfuscationMode​(org.refcodes.runtime.SystemContext aObfuscationMode)
      Builder method for the obfuscation mode property returning the builder for applying multiple build operations.
      RuntimeProperties withParseArgs​(java.lang.String[] aArgs)
      default RuntimeProperties withParseArgs​(java.util.List<java.lang.String> aArgs)
      RuntimeProperties withProperties​(org.refcodes.configuration.Properties aProperties)
      A hook for you to provide Properties programmatically.
      default RuntimeProperties withRootCondition​(org.refcodes.console.Condition aRootCondition)
      default RuntimeProperties withSecret​(java.lang.String aSecret)
      default RuntimeProperties withSeparatorChar​(char aSeparatorChar)
      default RuntimeProperties withStandardOut​(java.io.PrintStream aStandardOut)
      default RuntimeProperties withSyntaxNotation​(org.refcodes.console.SyntaxNotation aSyntaxNotation)
      default RuntimeProperties withTitle​(java.lang.String aTitle)
      default RuntimeProperties withUrl​(java.net.URL aUrl)
      default org.refcodes.console.ArgsParser withUsageLabel​(java.lang.String aUsageLabel)
      • Methods inherited from interface org.refcodes.console.ArgsParser

        errorLn, getRootCondition, printBanner, printCopyrightNote, printDescription, printHelp, printLicenseNote, printLn, printLn, printOptions, printSeparatorLn, printUsage, setBannerFont, setBannerFontPalette, setConsoleWidth, setCopyrightNote, setErrorOut, setLicenseNote, setLineBreak, setMaxConsoleWidth, setSeparatorChar, setStandardOut, setSyntaxNotation, setUsageLabel
      • Methods inherited from interface org.refcodes.configuration.ext.console.ArgsParserProperties

        evalArgs, evalArgs, evalArgs, evalArgs
      • Methods inherited from interface org.refcodes.structure.CanonicalMap

        toInstance, toInstance, toType, toType
      • Methods inherited from interface org.refcodes.structure.Containable

        isEmpty, size
      • Methods inherited from interface org.refcodes.mixin.DescriptionAccessor.DescriptionMutator

        setDescription
      • Methods inherited from interface org.refcodes.mixin.Dumpable

        toDump, toDump
      • Methods inherited from interface org.refcodes.mixin.NameAccessor.NameMutator

        setName
      • Methods inherited from interface org.refcodes.structure.PathMap

        directories, directories, entries, entries, fromExternalKey, get, get, getArray, getArray, getIndexes, getIndexes, getRootPath, hasIndexed, hasIndexed, hasParentPath, isArray, isArray, isDirectory, isEntry, isIndexed, isIndexed, isPath, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toPath
      • Methods inherited from interface org.refcodes.configuration.Properties

        childrenOf, containsValue, getDelimiter, getIndexed, getIndexed, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
      • Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin

        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
      • Methods inherited from interface org.refcodes.component.Resetable

        reset
      • Methods inherited from interface org.refcodes.configuration.ResourceProperties

        reload, reload
      • Methods inherited from interface org.refcodes.configuration.ResourcePropertiesMixin

        withFile, withFile, withFilePath, withFilePath, withFilePath, withFilePath, withInputStream, withUrl
      • Methods inherited from interface org.refcodes.console.RootConditionAccessor.RootConditionMutator

        setRootCondition
      • Methods inherited from interface org.refcodes.mixin.SecretAccessor.SecretMutator

        setSecret
      • Methods inherited from interface org.refcodes.mixin.TitleAccessor.TitleMutator

        setTitle
    • Field Detail

      • DELIMITERS

        static final char[] DELIMITERS
    • Method Detail

      • setObfuscationMode

        void setObfuscationMode​(org.refcodes.runtime.SystemContext aObfuscationMode)
        Specifies the obfuscation mode to be used.
        Parameters:
        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.
      • withObfuscationMode

        default RuntimeProperties withObfuscationMode​(org.refcodes.runtime.SystemContext aObfuscationMode)
        Builder method for the obfuscation mode property returning the builder for applying multiple build operations.
        Parameters:
        aObfuscationMode - The obfuscation mode as of setObfuscationMode(SystemContext).
        Returns:
        The builder for applying multiple build operations.
      • withRootCondition

        default RuntimeProperties withRootCondition​(org.refcodes.console.Condition aRootCondition)
        Specified by:
        withRootCondition in interface org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>
      • withSecret

        default RuntimeProperties withSecret​(java.lang.String aSecret)
        Specified by:
        withSecret in interface org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>
      • withProperties

        RuntimeProperties withProperties​(org.refcodes.configuration.Properties aProperties)
        A hook for you to provide Properties programmatically. The later you add Properties, the lower their precedence.
        Parameters:
        aProperties - The Properties to be added.
        Returns:
        This instance as of the builder pattern to apply method chaining.
      • withParseArgs

        RuntimeProperties withParseArgs​(java.lang.String[] aArgs)
                                 throws org.refcodes.console.UnknownArgsException,
                                        org.refcodes.console.AmbiguousArgsException,
                                        org.refcodes.console.SuperfluousArgsException,
                                        org.refcodes.console.ParseArgsException
        Specified by:
        withParseArgs in interface org.refcodes.console.ArgsParser
        Specified by:
        withParseArgs in interface org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withFile

        default RuntimeProperties withFile​(java.io.File aFile)
                                    throws java.io.IOException,
                                           java.text.ParseException
        Specified by:
        withFile in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withFilePath

        default RuntimeProperties withFilePath​(java.lang.String aFilePath)
                                        throws java.io.IOException,
                                               java.text.ParseException
        Specified by:
        withFilePath in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withFilePath

        default RuntimeProperties withFilePath​(java.lang.Class<?> aResourceClass,
                                               java.lang.String aFilePath)
                                        throws java.io.IOException,
                                               java.text.ParseException
        Specified by:
        withFilePath in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withUrl

        default RuntimeProperties withUrl​(java.net.URL aUrl)
                                   throws java.io.IOException,
                                          java.text.ParseException
        Specified by:
        withUrl in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withFile

        default RuntimeProperties withFile​(java.io.File aFile,
                                           org.refcodes.runtime.ConfigLocator aConfigLocator)
                                    throws java.io.IOException,
                                           java.text.ParseException
        Specified by:
        withFile in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withInputStream

        default RuntimeProperties withInputStream​(java.io.InputStream aInputStream)
                                           throws java.io.IOException,
                                                  java.text.ParseException
        Specified by:
        withInputStream in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
        Throws:
        java.io.IOException
        java.text.ParseException
      • withParseArgs

        default RuntimeProperties withParseArgs​(java.util.List<java.lang.String> aArgs)
                                         throws org.refcodes.console.UnknownArgsException,
                                                org.refcodes.console.AmbiguousArgsException,
                                                org.refcodes.console.SuperfluousArgsException,
                                                org.refcodes.console.ParseArgsException
        Specified by:
        withParseArgs in interface org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withTitle

        default RuntimeProperties withTitle​(java.lang.String aTitle)
        Specified by:
        withTitle in interface org.refcodes.console.ArgsParser
        Specified by:
        withTitle in interface org.refcodes.mixin.TitleAccessor.TitleBuilder<org.refcodes.console.ArgsParser>
      • withUsageLabel

        default org.refcodes.console.ArgsParser withUsageLabel​(java.lang.String aUsageLabel)
        Specified by:
        withUsageLabel in interface org.refcodes.console.ArgsParser
      • withBannerFont

        default RuntimeProperties withBannerFont​(org.refcodes.textual.Font aBannerFont)
        Specified by:
        withBannerFont in interface org.refcodes.console.ArgsParser
      • withBannerFontPalette

        default RuntimeProperties withBannerFontPalette​(char[] aColorPalette)
        Specified by:
        withBannerFontPalette in interface org.refcodes.console.ArgsParser
      • withConsoleWidth

        default RuntimeProperties withConsoleWidth​(int aConsoleWidth)
        Specified by:
        withConsoleWidth in interface org.refcodes.console.ArgsParser
      • withCopyrightNote

        default RuntimeProperties withCopyrightNote​(java.lang.String aCopyrightNote)
        Specified by:
        withCopyrightNote in interface org.refcodes.console.ArgsParser
      • withDescription

        default RuntimeProperties withDescription​(java.lang.String aDescription)
        Specified by:
        withDescription in interface org.refcodes.console.ArgsParser
        Specified by:
        withDescription in interface org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>
      • withErrorOut

        default RuntimeProperties withErrorOut​(java.io.PrintStream aErrorOut)
        Specified by:
        withErrorOut in interface org.refcodes.console.ArgsParser
      • withEvalArgs

        default RuntimeProperties withEvalArgs​(java.util.List<java.lang.String> aArgs)
                                        throws org.refcodes.console.UnknownArgsException,
                                               org.refcodes.console.AmbiguousArgsException,
                                               org.refcodes.console.SuperfluousArgsException,
                                               org.refcodes.console.ParseArgsException
        Specified by:
        withEvalArgs in interface org.refcodes.console.ArgsParser
        Specified by:
        withEvalArgs in interface org.refcodes.configuration.ext.console.ArgsParserProperties
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withEvalArgs

        default RuntimeProperties withEvalArgs​(java.lang.String aToPath,
                                               java.util.List<java.lang.String> aArgs)
                                        throws org.refcodes.console.UnknownArgsException,
                                               org.refcodes.console.AmbiguousArgsException,
                                               org.refcodes.console.SuperfluousArgsException,
                                               org.refcodes.console.ParseArgsException
        Specified by:
        withEvalArgs in interface org.refcodes.configuration.ext.console.ArgsParserProperties
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withEvalArgs

        default RuntimeProperties withEvalArgs​(java.lang.String aToPath,
                                               java.lang.String[] aArgs)
                                        throws org.refcodes.console.UnknownArgsException,
                                               org.refcodes.console.AmbiguousArgsException,
                                               org.refcodes.console.SuperfluousArgsException,
                                               org.refcodes.console.ParseArgsException
        Specified by:
        withEvalArgs in interface org.refcodes.configuration.ext.console.ArgsParserProperties
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withEvalArgs

        default RuntimeProperties withEvalArgs​(java.lang.String[] aArgs)
                                        throws org.refcodes.console.UnknownArgsException,
                                               org.refcodes.console.AmbiguousArgsException,
                                               org.refcodes.console.SuperfluousArgsException,
                                               org.refcodes.console.ParseArgsException
        Specified by:
        withEvalArgs in interface org.refcodes.console.ArgsParser
        Specified by:
        withEvalArgs in interface org.refcodes.configuration.ext.console.ArgsParserProperties
        Throws:
        org.refcodes.console.UnknownArgsException
        org.refcodes.console.AmbiguousArgsException
        org.refcodes.console.SuperfluousArgsException
        org.refcodes.console.ParseArgsException
      • withLicenseNote

        default RuntimeProperties withLicenseNote​(java.lang.String aLicenseNote)
        Specified by:
        withLicenseNote in interface org.refcodes.console.ArgsParser
      • withLineBreak

        default RuntimeProperties withLineBreak​(java.lang.String aLineBreak)
        Specified by:
        withLineBreak in interface org.refcodes.console.ArgsParser
      • withMaxConsoleWidth

        default RuntimeProperties withMaxConsoleWidth​(int aMaxConsoleWidth)
        Specified by:
        withMaxConsoleWidth in interface org.refcodes.console.ArgsParser
      • withName

        default RuntimeProperties withName​(java.lang.String aName)
        Specified by:
        withName in interface org.refcodes.console.ArgsParser
        Specified by:
        withName in interface org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>
      • withSeparatorChar

        default RuntimeProperties withSeparatorChar​(char aSeparatorChar)
        Specified by:
        withSeparatorChar in interface org.refcodes.console.ArgsParser
      • withStandardOut

        default RuntimeProperties withStandardOut​(java.io.PrintStream aStandardOut)
        Specified by:
        withStandardOut in interface org.refcodes.console.ArgsParser
      • withSyntaxNotation

        default RuntimeProperties withSyntaxNotation​(org.refcodes.console.SyntaxNotation aSyntaxNotation)
        Specified by:
        withSyntaxNotation in interface org.refcodes.console.ArgsParser