- java.lang.Object
-
- org.github.gestalt.config.entity.GestaltConfig
-
public class GestaltConfig extends java.lang.ObjectConfiguration for Gestalt.
-
-
Constructor Summary
Constructors Constructor Description GestaltConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.format.DateTimeFormattergetDateDecoderFormat()Java date decoder format.java.time.format.DateTimeFormattergetLocalDateFormat()Java local date decoder format.java.time.format.DateTimeFormattergetLocalDateTimeFormat()Java local date time decoder format.java.lang.System.Logger.LevelgetLogLevelForMissingValuesWhenDefaultOrOptional()Provide the log level when we log a message when a config is missing, but we provided a default, or it is Optional.intgetMaxSubstitutionNestedDepth()Get the maximum string substitution nested depth.<T extends GestaltModuleConfig>
TgetModuleConfig(java.lang.Class<T> klass)ProxyDecoderModegetProxyDecoderMode()Get For the proxy decoder mode, if we should use a cached value or call gestalt for the most recent value.java.lang.StringgetSubstitutionClosingToken()Get the token that represents the closing of a string substitution.java.lang.StringgetSubstitutionOpeningToken()Get the token that represents the opening of a string substitution.java.lang.StringgetSubstitutionRegex()the regex used to parse string substitutions.booleanisTreatMissingArrayIndexAsError()Treat missing array index's as errors.booleanisTreatMissingValuesAsErrors()Treat missing object values as errors.booleanisTreatNullValuesInClassAsErrors()Treat null values in classes after decoding as errors.booleanisTreatWarningsAsErrors()Treat all warnings as errors.voidregisterModuleConfig(java.util.Map<java.lang.Class,GestaltModuleConfig> module)voidregisterModuleConfig(GestaltModuleConfig module)voidsetDateDecoderFormat(java.time.format.DateTimeFormatter dateDecoderFormat)Java date decoder format.voidsetLocalDateFormat(java.time.format.DateTimeFormatter localDateFormat)Java local date decoder format.voidsetLocalDateTimeFormat(java.time.format.DateTimeFormatter localDateTimeFormat)Java local date time decoder format.voidsetLogLevelForMissingValuesWhenDefaultOrOptional(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.voidsetMaxSubstitutionNestedDepth(int maxSubstitutionNestedDepth)Set the maximum string substitution nested depth.voidsetProxyDecoderMode(ProxyDecoderMode proxyDecoderMode)Set For the proxy decoder mode, if we should use a cached value or call gestalt for the most recent value.voidsetSubstitutionClosingToken(java.lang.String substitutionClosingToken)Set the token that represents the opening of a string substitution.voidsetSubstitutionOpeningToken(java.lang.String substitutionOpeningToken)Set the token that represents the opening of a string substitution.voidsetSubstitutionRegex(java.lang.String substitutionRegex)the regex used to parse string substitutions.voidsetTreatMissingArrayIndexAsError(boolean treatMissingArrayIndexAsError)Treat missing array index's as errors.voidsetTreatMissingValuesAsErrors(boolean treatMissingValuesAsErrors)Treat missing object values as errors.voidsetTreatNullValuesInClassAsErrors(boolean treatNullValuesInClassAsErrors)Treat null values in classes after decoding as errors.voidsetTreatWarningsAsErrors(boolean treatWarningsAsErrors)Treat all warnings as errors.
-
-
-
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(GestaltModuleConfig module)
-
registerModuleConfig
public void registerModuleConfig(java.util.Map<java.lang.Class,GestaltModuleConfig> module)
-
getModuleConfig
public <T extends GestaltModuleConfig> T getModuleConfig(java.lang.Class<T> klass)
-
-