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 Details

    • NODE

      public static final IWorkflowNodeRegistry NODE
      Registry for WorkflowNode handlers. Provides static methods to access the available handlers, including handlers from plugin.
    • TRIGGER

      public static final IWorkflowTriggerRegistry TRIGGER
      Registry for WorkflowTrigger 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 a INodeHandler or ITriggerHandler, use the method provided by NODE and TRIGGER.
      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 be null.
      element - Element for which to retrieve the handler. Must implement either IWorkflowNodeTypeProviding or IWorkflowTriggerTypeProviding.
      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 by registerBuiltin(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