Class ChannelDefinitionDeploymentHelper
java.lang.Object
org.flowable.eventregistry.impl.deployer.ChannelDefinitionDeploymentHelper
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.getMostRecentVersionOfChannelDefinition
(ChannelDefinitionEntity channelDefinition) Gets the persisted channel definition that matches this one for tenant and key.getPersistedInstanceOfChannelDefinition
(ChannelDefinitionEntity channelDefinition) Gets the persisted version of the already-deployed channel definition.void
setResourceNamesOnEventDefinitions
(ParsedDeployment parsedDeployment) Updates all the channel definition entities to have the correct resource names.void
verifyChannelDefinitionsDoNotShareKeys
(Collection<ChannelDefinitionEntity> channelDefinitions) Verifies that no two channel definitions share the same key, to prevent database unique index violation.
-
Constructor Details
-
ChannelDefinitionDeploymentHelper
public ChannelDefinitionDeploymentHelper()
-
-
Method Details
-
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
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.