Class ChannelDefinitionDeploymentHelper


  • public class ChannelDefinitionDeploymentHelper
    extends Object
    Methods for working with deployments. Much of the actual work of EventDefinitionDeployer 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

      • ChannelDefinitionDeploymentHelper

        public ChannelDefinitionDeploymentHelper()
    • Method Detail

      • verifyChannelDefinitionsDoNotShareKeys

        public void verifyChannelDefinitionsDoNotShareKeys​(Collection<ChannelDefinitionEntity> channelDefinitions)
        Verifies that no two channel definitions share the same key, to prevent database unique index violation.
        Throws:
        org.flowable.common.engine.api.FlowableException - if any two channel definitions have the same key
      • copyDeploymentValuesToEventDefinitions

        public void copyDeploymentValuesToEventDefinitions​(EventDeploymentEntity deployment,
                                                           List<ChannelDefinitionEntity> channelDefinitions)
        Updates all the channel definition entities to match the deployment's values for tenant, engine version, and deployment id.
      • setResourceNamesOnEventDefinitions

        public void setResourceNamesOnEventDefinitions​(ParsedDeployment parsedDeployment)
        Updates all the channel definition entities to have the correct resource names.
      • getMostRecentVersionOfChannelDefinition

        public ChannelDefinitionEntity getMostRecentVersionOfChannelDefinition​(ChannelDefinitionEntity channelDefinition)
        Gets the persisted channel definition 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 channel definition entity.
      • getPersistedInstanceOfChannelDefinition

        public ChannelDefinitionEntity getPersistedInstanceOfChannelDefinition​(ChannelDefinitionEntity channelDefinition)
        Gets the persisted version of the already-deployed channel definition.