Class ChannelDefinitionDeploymentHelper
- java.lang.Object
-
- org.flowable.eventregistry.impl.deployer.ChannelDefinitionDeploymentHelper
-
public class ChannelDefinitionDeploymentHelper extends Object
Methods for working with deployments. Much of the actual work ofEventDefinitionDeployeris 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 Constructor Description ChannelDefinitionDeploymentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyDeploymentValuesToEventDefinitions(EventDeploymentEntity deployment, List<ChannelDefinitionEntity> channelDefinitions)Updates all the channel definition entities to match the deployment's values for tenant, engine version, and deployment id.ChannelDefinitionEntitygetMostRecentVersionOfChannelDefinition(ChannelDefinitionEntity channelDefinition)Gets the persisted channel definition that matches this one for tenant and key.ChannelDefinitionEntitygetPersistedInstanceOfChannelDefinition(ChannelDefinitionEntity channelDefinition)Gets the persisted version of the already-deployed channel definition.voidsetResourceNamesOnEventDefinitions(ParsedDeployment parsedDeployment)Updates all the channel definition entities to have the correct resource names.voidverifyChannelDefinitionsDoNotShareKeys(Collection<ChannelDefinitionEntity> channelDefinitions)Verifies that no two channel definitions share the same key, to prevent database unique index violation.
-
-
-
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.
-
-