org.broadleafcommerce.core.extension
Interface ExtensionHandler

All Known Subinterfaces:
MergeCartServiceExtensionHandler, OfferServiceExtensionHandler, OrderDaoExtensionHandler, OrderServiceExtensionHandler, SolrSearchServiceExtensionHandler
All Known Implementing Classes:
AbstractExtensionHandler, AbstractMergeCartServiceExtensionHandler, AbstractOfferServiceExtensionHandler, AbstractOrderDaoExtensionHandler, AbstractOrderServiceExtensionHandler, AbstractSolrSearchServiceExtensionHandler, I18nSolrSearchServiceExtensionHandler

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.getHandlers().add(this);
       }
    }
  }
 

Author:
bpolster

Method Summary
 int getPriority()
          Determines the priority of this extension handler.
 boolean isEnabled()
          If false, the ExtensionManager should skip this Handler.
 

Method Detail

getPriority

int getPriority()
Determines the priority of this extension handler.

Returns:

isEnabled

boolean isEnabled()
If false, the ExtensionManager should skip this Handler.

Returns:


Copyright © 2013. All Rights Reserved.