Enum EXfcExternalParameter
- All Implemented Interfaces:
Serializable, Comparable<EXfcExternalParameter>
Contains mappings from JVM argument and environment variable names to already existing configuration keys. JVM
application arguments follow the naming pattern 'xfc[GroupName][ParameterName]' and may be used to override
configuration settings by specifying an appropriate '-D' argument at start-up (e.g. '-DxfcDatabaseShortName=mariadb'
to override the value of the configuration key
XfcConfigKeys.Database.PROP_DBMS_SHORTNAME). For environment variables the
naming pattern is 'XFC_[UPPER_CASE_GROUP_NAME]_[UPPER_CASE_PARAMETER_NAME]'.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumexternal parameter groups. -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringthe corresponding configuration key for this elementfinal booleanflag deciding whether to use encryption for this element's value or notstatic final Stringfinal Stringthe environment variable name of this elementthe group of this elementstatic final Stringfinal Stringthe JVM argument name of this elementfinal booleanflag deciding whether to use masking for this element's value (e.g. in GUI or log) or notfinal Class<?> the expected value type this element -
Method Summary
Modifier and TypeMethodDescriptionstatic EXfcExternalParameterbyEnvironmentVariableName(String varName) static List<EXfcExternalParameter> byGroup(EXfcExternalParameter.Group... paramGroups) static EXfcExternalParameterbyJvmArgumentName(String argName) getValue()Checks whether an external parameter value for this element is defined and if so, returns it.booleanin(EXfcExternalParameter... extParams) static booleanisEnvironmentVariableSupported(String varName) static booleanisJvmArgumentSupported(String argName) static PropertiesrelatedProperties(EXfcExternalParameter.Group... paramGroups) static EXfcExternalParameterReturns the enum constant of this type with the specified name.static EXfcExternalParameter[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DB_SHORT_NAME
-
DB_JDBC_URL
-
DB_LOGIN_NAME
-
DB_LOGIN_PASSWORD
-
DB_MAX_CONNECTIONS
-
DB_CONNECTION_TIMEOUT
-
DB_CONNECT_TIMEOUT
-
DB_VALIDATE_TIMEOUT
-
DB_ENCRYPTION_ALGORITHM
-
DB_ENCRYPTION_PASSWORD
-
DB_ENCRYPT_FORM_DATA
-
DB_AUTO_UPDATE
-
DB_AUTO_UPDATE_PLUGINS
-
DB_UPDATE_CALLBACK_EMAILS
-
-
Field Details
-
JVM_ARGS_PREFIX
- See Also:
-
ENV_VAR_PREFIX
- See Also:
-
group
the group of this element -
jvmArgName
the JVM argument name of this element -
envVarName
the environment variable name of this element -
configPropertyName
the corresponding configuration key for this element -
valueType
the expected value type this element -
encrypt
public final boolean encryptflag deciding whether to use encryption for this element's value or not -
mask
public final boolean maskflag deciding whether to use masking for this element's value (e.g. in GUI or log) or not
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getConfigPropertyName
- Returns:
- the corresponding configuration key of this element
-
getValue
Checks whether an external parameter value for this element is defined and if so, returns it. The algorithm works as follows- do a look-up in the system properties and return the value if one is present
- do a look-up in the environment variables and return the value if one is present
- return null
- Returns:
- the plain value of this parameter (as provided by
System.getProperty(java.lang.String)orSystem.getenv(java.lang.String)) - null, if no such parameter was set.
-
in
- Parameters:
extParams- the enum elements to check this element against- Returns:
- true if this element is contained in the set of the provided elements, otherwise false
-
isJvmArgumentSupported
- Parameters:
argName- the JVM argument name to be checked- Returns:
- true if the provided argument name is a valid one, otherwise false
-
isEnvironmentVariableSupported
- Parameters:
varName- the environment variable name to be checked- Returns:
- true if the provided environment variable name is a valid one, otherwise false
-
byJvmArgumentName
- Parameters:
argName- the JVM argument name of the desired enum element- Returns:
- the matching enum element (null, if no such element could be found)
-
byEnvironmentVariableName
- Parameters:
varName- the environment variable name of the desired enum element- Returns:
- the matching enum element (null, if no such element could be found)
-
byGroup
- Parameters:
paramGroups- the argument group(s) to filter by- Returns:
- a list containing all of the enum elements belonging to the provided group(s)
-