Package org.camunda.bpm.engine.impl.cfg
Class CompositeProcessEnginePlugin
- java.lang.Object
-
- org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin
-
- org.camunda.bpm.engine.impl.cfg.CompositeProcessEnginePlugin
-
- All Implemented Interfaces:
ProcessEnginePlugin
public class CompositeProcessEnginePlugin extends AbstractProcessEnginePlugin
ProcessEnginePlugin
that provides composite behavior. When registered on an engine configuration, all plugins added to this composite will be triggered on preInit/postInit/postProcessEngineBuild.Use to encapsulate common behavior (like engine configuration).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<ProcessEnginePlugin>
plugins
-
Constructor Summary
Constructors Constructor Description CompositeProcessEnginePlugin()
New instance with empty list.CompositeProcessEnginePlugin(java.util.List<ProcessEnginePlugin> plugins)
New instance with initial plugins.CompositeProcessEnginePlugin(ProcessEnginePlugin plugin, ProcessEnginePlugin... additionalPlugins)
New instance with vararg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeProcessEnginePlugin
addProcessEnginePlugin(ProcessEnginePlugin plugin, ProcessEnginePlugin... additionalPlugins)
Add one (or more) plugins.CompositeProcessEnginePlugin
addProcessEnginePlugins(java.util.Collection<ProcessEnginePlugin> plugins)
Add collection of plugins.java.util.List<ProcessEnginePlugin>
getPlugins()
Get all plugins.void
postInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Invoked after the process engine configuration is initialized.void
postProcessEngineBuild(ProcessEngine processEngine)
Invoked after the process engine has been built.void
preInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Invoked before the process engine configuration is initialized.java.lang.String
toString()
-
-
-
Field Detail
-
plugins
protected final java.util.List<ProcessEnginePlugin> plugins
-
-
Constructor Detail
-
CompositeProcessEnginePlugin
public CompositeProcessEnginePlugin()
New instance with empty list.
-
CompositeProcessEnginePlugin
public CompositeProcessEnginePlugin(ProcessEnginePlugin plugin, ProcessEnginePlugin... additionalPlugins)
New instance with vararg.- Parameters:
plugin
- first pluginadditionalPlugins
- additional vararg plugins
-
CompositeProcessEnginePlugin
public CompositeProcessEnginePlugin(java.util.List<ProcessEnginePlugin> plugins)
New instance with initial plugins.- Parameters:
plugins
- the initial plugins. Must not be null.
-
-
Method Detail
-
addProcessEnginePlugin
public CompositeProcessEnginePlugin addProcessEnginePlugin(ProcessEnginePlugin plugin, ProcessEnginePlugin... additionalPlugins)
Add one (or more) plugins.- Parameters:
plugin
- first pluginadditionalPlugins
- additional vararg plugins- Returns:
- self for fluent usage
-
addProcessEnginePlugins
public CompositeProcessEnginePlugin addProcessEnginePlugins(java.util.Collection<ProcessEnginePlugin> plugins)
Add collection of plugins. If collection is not sortable, order of plugin execution can not be guaranteed.- Parameters:
plugins
- plugins to add- Returns:
- self for fluent usage
-
preInit
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Description copied from interface:ProcessEnginePlugin
Invoked before the process engine configuration is initialized.
- Specified by:
preInit
in interfaceProcessEnginePlugin
- Overrides:
preInit
in classAbstractProcessEnginePlugin
- Parameters:
processEngineConfiguration
- the process engine configuation
-
postInit
public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Description copied from interface:ProcessEnginePlugin
Invoked after the process engine configuration is initialized. and before the process engine is built.
- Specified by:
postInit
in interfaceProcessEnginePlugin
- Overrides:
postInit
in classAbstractProcessEnginePlugin
- Parameters:
processEngineConfiguration
- the process engine configuation
-
postProcessEngineBuild
public void postProcessEngineBuild(ProcessEngine processEngine)
Description copied from interface:ProcessEnginePlugin
Invoked after the process engine has been built.
- Specified by:
postProcessEngineBuild
in interfaceProcessEnginePlugin
- Overrides:
postProcessEngineBuild
in classAbstractProcessEnginePlugin
-
getPlugins
public java.util.List<ProcessEnginePlugin> getPlugins()
Get all plugins.- Returns:
- the configured plugins
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractProcessEnginePlugin
-
-