Package com.install4j.api.beans
Class VariableErrorHandlingDescriptor
java.lang.Object
com.install4j.api.beans.VariableErrorHandlingDescriptor
Specifies the error handling for variable replacements. Instances of this class are passed to some of the
replaceVariables(...)
methods in AbstractBean
.
Each variable type (installer variable, I18N message, compiler and form variable) has its own error handling.
Note: compiler variables in the project are replaced at compile time. Compiler variables in external files, such as a custom localization file, are not replaced at a compile time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VariableErrorHandlingDescriptor
Always replace undefined variables with an error message.static final VariableErrorHandlingDescriptor
Always throw exceptions for undefined variables.static final VariableErrorHandlingDescriptor
Ignore all undefined variables.static final VariableErrorHandlingDescriptor
The default error handling. -
Constructor Summary
ConstructorsConstructorDescriptionVariableErrorHandlingDescriptor
(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables) Construct a custom variable error handling LikeVariableErrorHandlingDescriptor(VariableErrorHandling, VariableErrorHandling, VariableErrorHandling, VariableErrorHandling)
with formVariables set toVariableErrorHandling.ERROR_MESSAGE
.VariableErrorHandlingDescriptor
(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables, VariableErrorHandling formVariables) Construct a custom variable error handling -
Method Summary
Modifier and TypeMethodDescriptionReturns the error handling for compiler variables.Returns the error handling for form variables.Returns the error handling for localization keys.Returns the error handling for installer variables.
-
Field Details
-
DEFAULT
The default error handling. Throw an exception for undefined installer variables, replace undefined localization keys, and compiler variables with an error message. -
ALWAYS_IGNORE
Ignore all undefined variables. -
ALWAYS_ERROR_MESSAGE
Always replace undefined variables with an error message. -
ALWAYS_EXCEPTION
Always throw exceptions for undefined variables.
-
-
Constructor Details
-
VariableErrorHandlingDescriptor
public VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables) Construct a custom variable error handling LikeVariableErrorHandlingDescriptor(VariableErrorHandling, VariableErrorHandling, VariableErrorHandling, VariableErrorHandling)
with formVariables set toVariableErrorHandling.ERROR_MESSAGE
. -
VariableErrorHandlingDescriptor
public VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables, VariableErrorHandling formVariables) Construct a custom variable error handling- Parameters:
installerVariables
- error handling for installer variablesi18nKeys
- error handling for localization keyscompilerVariables
- error handling for compiler variablesformVariables
- error handling for form variables
-
-
Method Details
-
getInstallerVariables
Returns the error handling for installer variables.- Returns:
- the error handling
-
getI18nKeys
Returns the error handling for localization keys.- Returns:
- the error handling
-
getCompilerVariables
Returns the error handling for compiler variables.- Returns:
- the error handling
-
getFormVariables
Returns the error handling for form variables.- Returns:
- the error handling
-