Class FormDefinitionDeploymentHelper


  • public class FormDefinitionDeploymentHelper
    extends Object
    Methods for working with deployments. Much of the actual work of FormDefinitionDeployer is done by orchestrating the different pieces of work this class does; by having them here, we allow other deployers to make use of them.
    • Constructor Detail

      • FormDefinitionDeploymentHelper

        public FormDefinitionDeploymentHelper()
    • Method Detail

      • verifyFormsDoNotShareKeys

        public void verifyFormsDoNotShareKeys​(Collection<FormDefinitionEntity> forms)
        Verifies that no two forms share the same key, to prevent database unique index violation.
        Throws:
        FlowableException - if any two forms have the same key
      • copyDeploymentValuesToForms

        public void copyDeploymentValuesToForms​(FormDeploymentEntity deployment,
                                                List<FormDefinitionEntity> formDefinitions)
        Updates all the form entities to match the deployment's values for tenant, engine version, and deployment id.
      • setResourceNamesOnFormDefinitions

        public void setResourceNamesOnFormDefinitions​(ParsedDeployment parsedDeployment)
        Updates all the form entities to have the correct resource names.
      • getMostRecentVersionOfForm

        public FormDefinitionEntity getMostRecentVersionOfForm​(FormDefinitionEntity formDefinition)
        Gets the most recent persisted form that matches this one for tenant and key. If none is found, returns null. This method assumes that the tenant and key are properly set on the form entity.