Class WorkflowRegistry
- java.lang.Object
-
- de.xima.fc.plugin.workflow.registry.WorkflowRegistry
-
public final class WorkflowRegistry extends Object
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
Fields Modifier and Type Field Description static IWorkflowNodeRegistry
NODE
Registry forWorkflowNode
handlers.static IWorkflowTriggerRegistry
TRIGGER
Registry forWorkflowTrigger
handlers.
-
Constructor Summary
Constructors Constructor Description WorkflowRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Field Detail
-
NODE
public static final IWorkflowNodeRegistry NODE
Registry forWorkflowNode
handlers. Provides static methods to access the available handlers, including handlers from plugin.
-
TRIGGER
public static final IWorkflowTriggerRegistry TRIGGER
Registry forWorkflowTrigger
handlers. Provides static methods to access the available handlers, including handlers from plugin.
-
-
Method Detail
-
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.- 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 (IWorkflowElementTypeProviding.getType()
).
-
-