Package org.camunda.bpm.engine.impl
Class HistoryTimeToLiveParser
java.lang.Object
org.camunda.bpm.engine.impl.HistoryTimeToLiveParser
Class that encapsulates the business logic of parsing HistoryTimeToLive of different deployable resources (process, definition, case).
Furthermore, it considers notifying the users with a logging message when parsing historyTimeToLive values that are
the same with the default camunda modeler TTL value (see CAMUNDA_MODELER_TTL_DEFAULT_VALUE
).
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected final boolean
protected final String
protected static final ConfigurationLogger
-
Constructor Summary
ModifierConstructorDescriptionprotected
HistoryTimeToLiveParser
(boolean enforceNonNullValue, String httlConfigValue) -
Method Summary
Modifier and TypeMethodDescriptionstatic HistoryTimeToLiveParser
create()
static HistoryTimeToLiveParser
create
(ProcessEngineConfigurationImpl config) static HistoryTimeToLiveParser
create
(CommandContext context) protected Integer
parseAndValidate
(String historyTimeToLiveString, String definitionKey, boolean skipEnforceTtl) Parses the given HistoryTimeToLive String expression and then executes any applicable validation before returning the parsed value.void
-
Field Details
-
LOG
-
CAMUNDA_MODELER_TTL_DEFAULT_VALUE
protected static final int CAMUNDA_MODELER_TTL_DEFAULT_VALUE- See Also:
-
enforceNonNullValue
protected final boolean enforceNonNullValue -
httlConfigValue
-
-
Constructor Details
-
HistoryTimeToLiveParser
-
-
Method Details
-
create
-
create
-
create
-
validate
-
parse
-
parse
-
parse
-
parseAndValidate
protected Integer parseAndValidate(String historyTimeToLiveString, String definitionKey, boolean skipEnforceTtl) throws NotValidException Parses the given HistoryTimeToLive String expression and then executes any applicable validation before returning the parsed value.- Parameters:
historyTimeToLiveString
- the history time to live string expression in ISO-8601 formatdefinitionKey
- the correlated definition key that this historyTimeToLive was fetched from (process definition key for processes, decision definition key for decisions, case definition key for cases).skipEnforceTtl
- skips enforcing the TTL.- Returns:
- the parsed integer value of history time to live
- Throws:
NotValidException
- in case enforcement of non-null values is on and the parsed result was null
-