public interface ExtensionHandler
An extension handler represents a generic pattern used in BroadleafCommerce when an out-of-box service with complex logic provides implementation hooks.
The pattern is primarily used internally by Broadleaf as a mechanism to provide extension points for Broadleaf modules.
Consumers of BroadleafCommerce framework typically would not need to use this pattern and instead would opt. for more typical extension patterns including overriding or extending the actual component for which alternate behavior is desired.
ExtensionHandler api methods should always return an instance of ExtensionResultStatusType
and will usually
extend from AbstractExtensionHandler
In order to associate an ExtensionHandler) with an {@link ExtensionManager}, each handler should have an @PostConstruct override and associate itself with the manager:
{@code {@literal @}Resource(name = "blSomeExtensionManager") protected ExtensionManager extensionManager; {@literal @}PostConstruct public void init() { if (isEnabled()) { extensionManager.registerHandler(this); } } }
AbstractExtensionHandler}
Modifier and Type | Method and Description |
---|---|
int |
getPriority()
Determines the priority of this extension handler.
|
boolean |
isEnabled()
If false, the ExtensionManager should skip this Handler.
|
Copyright © 2022. All rights reserved.