Interface FormState
- All Known Subinterfaces:
MutableFormState
- All Known Implementing Classes:
DbFormState
public interface FormState
-
Method Summary
Modifier and TypeMethodDescriptionvoidfindFormByIdAndDeploymentKey(org.agrona.DirectBuffer formId, long deploymentKey, String tenantId) Query forms by the given form id and deployment key and return the form.findFormByIdAndVersionTag(org.agrona.DirectBuffer formId, String versionTag, String tenantId) Query forms by the given form id and version tag and return the form.findFormByKey(long formKey, String tenantId) Query forms by the given form key and return the form.findLatestFormById(org.agrona.DirectBuffer formId, String tenantId) Query forms by the given form id and return the latest version of the form.intgetNextFormVersion(String formId, String tenantId) Gets the next version a form of a given id will receive.
-
Method Details
-
findLatestFormById
Query forms by the given form id and return the latest version of the form.- Parameters:
formId- the id of the formtenantId- 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
Query forms by the given form key and return the form.- Parameters:
formKey- the key of the formtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form is deployed with the given key
-
findFormByIdAndDeploymentKey
Optional<PersistedForm> findFormByIdAndDeploymentKey(org.agrona.DirectBuffer formId, long deploymentKey, String tenantId) Query forms by the given form id and deployment key and return the form.- Parameters:
formId- the id of the formdeploymentKey- the key of the deployment the form was deployed withtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form with the given id was deployed with the given deployment
-
findFormByIdAndVersionTag
Optional<PersistedForm> findFormByIdAndVersionTag(org.agrona.DirectBuffer formId, String versionTag, String tenantId) Query forms by the given form id and version tag and return the form.- Parameters:
formId- the id of the formversionTag- the version tag of the formtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form with the given id and version tag is deployed
-
getNextFormVersion
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()
-