Class WorkflowRegistry
java.lang.Object
de.xima.fc.plugin.workflow.registry.WorkflowRegistry
Registry for all workflow element handler. Each workflow element type is associated with a handler, which contains
the logic specific to that type. Provides static methods to access the available handlers, including handlers from
plugins.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IWorkflowNodeRegistry
Registry forWorkflowNode
handlers.static final IWorkflowTriggerRegistry
Registry forWorkflowTrigger
handlers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IElementHandler<?,
?> getHandler
(Mandant client, IWorkflowElementTypeProviding element) Finds the workflow element handler for the given workflow element, which may be a trigger or node.static <TData,
TElement extends IWorkflowElementEntity>
voidregisterBuiltin
(IElementHandler<TData, TElement> handler) Registers a built-in workflow element handler with the registry.static <TData,
TElement extends IWorkflowElementEntity>
voidunregisterBuiltin
(IElementHandler<TData, TElement> handler) Unregisters a built-in workflow element handler that was previously registered byregisterBuiltin(IElementHandler)
.
-
Field Details
-
NODE
Registry forWorkflowNode
handlers. Provides static methods to access the available handlers, including handlers from plugin. -
TRIGGER
Registry forWorkflowTrigger
handlers. Provides static methods to access the available handlers, including handlers from plugin.
-
-
Constructor Details
-
WorkflowRegistry
public WorkflowRegistry()
-
-
Method Details
-
getHandler
@Nullable public static IElementHandler<?,?> getHandler(Mandant client, IWorkflowElementTypeProviding element) Finds the workflow element handler for the given workflow element, which may be a trigger or node. If you need to gain access to aINodeHandler
orITriggerHandler
, use the method provided byNODE
andTRIGGER
.- Parameters:
client
- The current client for which to retrieve the handler. Used for resolving client-specific workflow element plugins. If you do not care about client-specific plugins, this may benull
.element
- Element for which to retrieve the handler. Must implement eitherIWorkflowNodeTypeProviding
orIWorkflowTriggerTypeProviding
.- Returns:
- The handler for the given workflow element, or
null
if no handler could be found.
-
registerBuiltin
public static <TData,TElement extends IWorkflowElementEntity> void registerBuiltin(IElementHandler<TData, TElement> handler) Registers a built-in workflow element handler with the registry. Should NOT be used by plugins, except for setup during integration tests.- Type Parameters:
TData
- Type of the workflow element's properties model.TElement
- Type of the workflow element.- Parameters:
handler
- Handler to register. The type is read from the (handler's type
).
-
unregisterBuiltin
public static <TData,TElement extends IWorkflowElementEntity> void unregisterBuiltin(IElementHandler<TData, TElement> handler) Unregisters a built-in workflow element handler that was previously registered byregisterBuiltin(IElementHandler)
. Should NOT be used by plugins, except for setup during integration tests.- Type Parameters:
TData
- Type of the workflow element's properties model.TElement
- Type of the workflow element.- Parameters:
handler
- Handler to unregister. The type is read from the (handler's type
).- Since:
- 8.0.0
-