Class HistoryTimeToLiveParser

java.lang.Object
org.camunda.bpm.engine.impl.HistoryTimeToLiveParser

public class HistoryTimeToLiveParser extends Object
Class that encapsulates the business logic of parsing HistoryTimeToLive of different deployable resources (process, definition, case).
  • Field Details

    • LOG

      protected static final ConfigurationLogger LOG
    • enforceNonNullValue

      protected final boolean enforceNonNullValue
    • httlConfigValue

      protected final String httlConfigValue
  • Constructor Details

    • HistoryTimeToLiveParser

      protected HistoryTimeToLiveParser(boolean enforceNonNullValue, String httlConfigValue)
  • Method Details

    • create

      public static HistoryTimeToLiveParser create()
    • create

      public static HistoryTimeToLiveParser create(CommandContext context)
    • create

    • validate

      public void validate(Integer historyTimeToLive)
    • parse

      public Integer parse(Element processElement, String definitionKey, boolean skipEnforceTtl)
    • parse

      public Integer parse(Case caseElement, String definitionKey, boolean skipEnforceTtl)
    • parse

      public Integer parse(Decision decision, String definitionKey, boolean skipEnforceTtl)
    • 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 format
      definitionKey - 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