Class GestaltConfig


  • public class GestaltConfig
    extends java.lang.Object
    Configuration for Gestalt.
    • Constructor Detail

      • GestaltConfig

        public GestaltConfig()
    • Method Detail

      • isTreatWarningsAsErrors

        public boolean isTreatWarningsAsErrors()
        Treat all warnings as errors.
        Returns:
        Treat all warnings as errors
      • setTreatWarningsAsErrors

        public void setTreatWarningsAsErrors​(boolean treatWarningsAsErrors)
        Treat all warnings as errors.
        Parameters:
        treatWarningsAsErrors - Treat all warnings as errors.
      • isTreatMissingArrayIndexAsError

        public boolean isTreatMissingArrayIndexAsError()
        Treat missing array index's as errors.
        Returns:
        Treat missing array index's as errors.
      • setTreatMissingArrayIndexAsError

        public void setTreatMissingArrayIndexAsError​(boolean treatMissingArrayIndexAsError)
        Treat missing array index's as errors.
        Parameters:
        treatMissingArrayIndexAsError - Treat missing array index's as errors.
      • isTreatMissingValuesAsErrors

        public boolean isTreatMissingValuesAsErrors()
        Treat missing object values as errors.
        Returns:
        Treat missing object values as errors
      • setTreatMissingValuesAsErrors

        public void setTreatMissingValuesAsErrors​(boolean treatMissingValuesAsErrors)
        Treat missing object values as errors.
        Parameters:
        treatMissingValuesAsErrors - Treat missing object values as errors
      • isTreatNullValuesInClassAsErrors

        public boolean isTreatNullValuesInClassAsErrors()
        Treat null values in classes after decoding as errors.
        Returns:
        Treat null values in classes after decoding as errors.
      • setTreatNullValuesInClassAsErrors

        public void setTreatNullValuesInClassAsErrors​(boolean treatNullValuesInClassAsErrors)
        Treat null values in classes after decoding as errors.
        Parameters:
        treatNullValuesInClassAsErrors - Treat null values in classes after decoding as errors.
      • getProxyDecoderMode

        public ProxyDecoderMode getProxyDecoderMode()
        Get For the proxy decoder mode, if we should use a cached value or call gestalt for the most recent value.
        Returns:
        the proxy decoder mode
      • setProxyDecoderMode

        public void setProxyDecoderMode​(ProxyDecoderMode proxyDecoderMode)
        Set For the proxy decoder mode, if we should use a cached value or call gestalt for the most recent value.
        Parameters:
        proxyDecoderMode - if we should use a cached value or call gestalt for the most recent value.
      • getLogLevelForMissingValuesWhenDefaultOrOptional

        public java.lang.System.Logger.Level getLogLevelForMissingValuesWhenDefaultOrOptional()
        Provide the log level when we log a message when a config is missing, but we provided a default, or it is Optional.
        Returns:
        Log level
      • setLogLevelForMissingValuesWhenDefaultOrOptional

        public void setLogLevelForMissingValuesWhenDefaultOrOptional​(java.lang.System.Logger.Level logLevelForMissingValuesWhenDefaultOrOptional)
        Provide the log level when we log a message when a config is missing, but we provided a default, or it is Optional.
        Parameters:
        logLevelForMissingValuesWhenDefaultOrOptional - Log level
      • getDateDecoderFormat

        public java.time.format.DateTimeFormatter getDateDecoderFormat()
        Java date decoder format.
        Returns:
        Java date decoder format
      • setDateDecoderFormat

        public void setDateDecoderFormat​(java.time.format.DateTimeFormatter dateDecoderFormat)
        Java date decoder format.
        Parameters:
        dateDecoderFormat - Java date decoder format
      • getLocalDateTimeFormat

        public java.time.format.DateTimeFormatter getLocalDateTimeFormat()
        Java local date time decoder format.
        Returns:
        Java local date time decoder format.
      • setLocalDateTimeFormat

        public void setLocalDateTimeFormat​(java.time.format.DateTimeFormatter localDateTimeFormat)
        Java local date time decoder format.
        Parameters:
        localDateTimeFormat - Java local date time decoder format.
      • getLocalDateFormat

        public java.time.format.DateTimeFormatter getLocalDateFormat()
        Java local date decoder format.
        Returns:
        Java local date decoder format.
      • setLocalDateFormat

        public void setLocalDateFormat​(java.time.format.DateTimeFormatter localDateFormat)
        Java local date decoder format.
        Parameters:
        localDateFormat - Java local date decoder format.
      • getSubstitutionOpeningToken

        public java.lang.String getSubstitutionOpeningToken()
        Get the token that represents the opening of a string substitution.
        Returns:
        Token that represents the opening of a string substitution.
      • setSubstitutionOpeningToken

        public void setSubstitutionOpeningToken​(java.lang.String substitutionOpeningToken)
        Set the token that represents the opening of a string substitution.
        Parameters:
        substitutionOpeningToken - Token that represents the opening of a string substitution.
      • getSubstitutionClosingToken

        public java.lang.String getSubstitutionClosingToken()
        Get the token that represents the closing of a string substitution.
        Returns:
        Token that represents the closing of a string substitution.
      • setSubstitutionClosingToken

        public void setSubstitutionClosingToken​(java.lang.String substitutionClosingToken)
        Set the token that represents the opening of a string substitution.
        Parameters:
        substitutionClosingToken - Token that represents the closing of a string substitution.
      • getMaxSubstitutionNestedDepth

        public int getMaxSubstitutionNestedDepth()
        Get the maximum string substitution nested depth. If you have nested or recursive substitutions that go deeper than this it will fail.
        Returns:
        the maximum string substitution nested depth.
      • setMaxSubstitutionNestedDepth

        public void setMaxSubstitutionNestedDepth​(int maxSubstitutionNestedDepth)
        Set the maximum string substitution nested depth. If you have nested or recursive substitutions that go deeper than this it will fail.
        Parameters:
        maxSubstitutionNestedDepth - the maximum string substitution nested depth.
      • getSubstitutionRegex

        public java.lang.String getSubstitutionRegex()
        the regex used to parse string substitutions. Must have a named capture group transform, key, and default, where the key is required and the transform and default are optional.
        Returns:
        the string substitution regex
      • setSubstitutionRegex

        public void setSubstitutionRegex​(java.lang.String substitutionRegex)
        the regex used to parse string substitutions. Must have a named capture group transform, key, and default, where the key is required and the transform and default are optional.
        Parameters:
        substitutionRegex - the string substitution regex
      • registerModuleConfig

        public void registerModuleConfig​(java.util.Map<java.lang.Class,​GestaltModuleConfig> module)
      • getModuleConfig

        public <T extends GestaltModuleConfig> T getModuleConfig​(java.lang.Class<T> klass)