Interface FormState

All Known Subinterfaces:
MutableFormState
All Known Implementing Classes:
DbFormState

public interface FormState
  • Method Details

    • findLatestFormById

      Optional<PersistedForm> findLatestFormById(String formId, String tenantId)
      Query forms by the given form id and return the latest version of the form.
      Parameters:
      formId - the id of the form
      tenantId - the id of the tenant
      Returns:
      the latest version of the form, or Optional.empty() if no form is deployed with the given id
    • findFormByKey

      Optional<PersistedForm> findFormByKey(long formKey, String tenantId)
      Query forms by the given form key and return the form.
      Parameters:
      formKey - the key of the form
      tenantId - the id of the tenant
      Returns:
      the form, or Optional.empty() if no form is deployed with the given key
    • getNextFormVersion

      int getNextFormVersion(String formId, String tenantId)
      Gets the next version a form of a given id will receive. This is used, for example, when a new deployment is done. Using this method we decide the version the newly deployed form receives.
      Parameters:
      formId - the id of the form
    • clearCache

      void clearCache()