Class NoOpExtensionProvider

java.lang.Object
com.yworkflow.definition.model.extension.noop.NoOpExtensionProvider
All Implemented Interfaces:
ExtensionProvider

public class NoOpExtensionProvider extends Object implements ExtensionProvider
No-operation implementation of ExtensionProvider. NoOpExtensionProvider provides a default implementation that throws UnresolvableExtensionException for all extension requests, except for attribute resolution which returns a NoOpWorkflowAttributeResolver.
Since:
1.0
See Also:
  • Constructor Details

    • NoOpExtensionProvider

      public NoOpExtensionProvider()
      Default Constructor.
  • Method Details

    • init

      public void init(WorkflowInitContext initContext)
      Initializes the extension provider. This implementation performs no initialization.
      Specified by:
      init in interface ExtensionProvider
      Parameters:
      initContext - workflow configuration
    • getAttributeResolver

      public WorkflowAttributeResolver getAttributeResolver(Attributes args)
      Returns a NoOpWorkflowAttributeResolver for attribute resolution.
      Specified by:
      getAttributeResolver in interface ExtensionProvider
      Parameters:
      args - the args to configure the resolver with
      Returns:
      a NoOpWorkflowAttributeResolver instance
    • getCondition

      public WorkflowCondition getCondition(String type, String value, Attributes args)
      Throws UnresolvableExtensionException for condition requests.
      Specified by:
      getCondition in interface ExtensionProvider
      Parameters:
      type - the condition type
      value - the condition value
      args - the condition arguments
      Returns:
      never returns, always throws UnresolvableExtensionException
      Throws:
      UnresolvableExtensionException - always thrown for condition requests
    • getFunction

      public WorkflowFunction getFunction(String type, String value, Attributes args)
      Throws UnresolvableExtensionException for function requests.
      Specified by:
      getFunction in interface ExtensionProvider
      Parameters:
      type - the function type
      value - the function value
      args - the function arguments
      Returns:
      never returns, always throws UnresolvableExtensionException
      Throws:
      UnresolvableExtensionException - always thrown for function requests
    • getAttributeRegister

      public WorkflowAttributeRegister<?> getAttributeRegister(String type, String value, Attributes args)
      Throws UnresolvableExtensionException for attribute register requests.
      Specified by:
      getAttributeRegister in interface ExtensionProvider
      Parameters:
      type - the attribute register type
      value - the attribute register value
      args - the attribute register arguments
      Returns:
      never returns, always throws UnresolvableExtensionException
      Throws:
      UnresolvableExtensionException - always thrown for attribute register requests
    • getValidator

      public WorkflowInputValidator getValidator(String type, String value, Attributes args)
      Throws UnresolvableExtensionException for validator requests.
      Specified by:
      getValidator in interface ExtensionProvider
      Parameters:
      type - the validator type
      value - the validator value
      args - the validator arguments
      Returns:
      never returns, always throws UnresolvableExtensionException
      Throws:
      UnresolvableExtensionException - always thrown for validator requests
    • noOp

      public static ExtensionProvider noOp()
      Creates a no-op extension provider that provides default implementations for all extension types. This is useful for testing or when no custom extensions are needed.
      Returns:
      a no-op extension provider