Class NoOpExtensionProvider
java.lang.Object
com.yworkflow.definition.model.extension.noop.NoOpExtensionProvider
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeRegister(String type, String value, Attributes args) Throws UnresolvableExtensionException for attribute register requests.Returns a NoOpWorkflowAttributeResolver for attribute resolution.getCondition(String type, String value, Attributes args) Throws UnresolvableExtensionException for condition requests.getFunction(String type, String value, Attributes args) Throws UnresolvableExtensionException for function requests.getValidator(String type, String value, Attributes args) Throws UnresolvableExtensionException for validator requests.voidinit(WorkflowInitContext initContext) Initializes the extension provider.static ExtensionProvidernoOp()Creates a no-op extension provider that provides default implementations for all extension types.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.yworkflow.definition.model.ExtensionProvider
getPriority
-
Constructor Details
-
NoOpExtensionProvider
public NoOpExtensionProvider()Default Constructor.
-
-
Method Details
-
init
Initializes the extension provider. This implementation performs no initialization.- Specified by:
initin interfaceExtensionProvider- Parameters:
initContext- workflow configuration
-
getAttributeResolver
Returns a NoOpWorkflowAttributeResolver for attribute resolution.- Specified by:
getAttributeResolverin interfaceExtensionProvider- Parameters:
args- the args to configure the resolver with- Returns:
- a NoOpWorkflowAttributeResolver instance
-
getCondition
Throws UnresolvableExtensionException for condition requests.- Specified by:
getConditionin interfaceExtensionProvider- Parameters:
type- the condition typevalue- the condition valueargs- the condition arguments- Returns:
- never returns, always throws UnresolvableExtensionException
- Throws:
UnresolvableExtensionException- always thrown for condition requests
-
getFunction
Throws UnresolvableExtensionException for function requests.- Specified by:
getFunctionin interfaceExtensionProvider- Parameters:
type- the function typevalue- the function valueargs- 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:
getAttributeRegisterin interfaceExtensionProvider- Parameters:
type- the attribute register typevalue- the attribute register valueargs- the attribute register arguments- Returns:
- never returns, always throws UnresolvableExtensionException
- Throws:
UnresolvableExtensionException- always thrown for attribute register requests
-
getValidator
Throws UnresolvableExtensionException for validator requests.- Specified by:
getValidatorin interfaceExtensionProvider- Parameters:
type- the validator typevalue- the validator valueargs- the validator arguments- Returns:
- never returns, always throws UnresolvableExtensionException
- Throws:
UnresolvableExtensionException- always thrown for validator requests
-
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
-