Class ExtensionRegistry

java.lang.Object
org.onehippo.cms7.services.extension.ExtensionRegistry

public class ExtensionRegistry extends Object
Registry of Hippo CMS extensions provided via classloaders other than the main repository classloader. This is typically used to register HST site delivery code loaded via a separate WAR file.
  • Constructor Details

    • ExtensionRegistry

      public ExtensionRegistry()
  • Method Details

    • register

      public static void register(ExtensionEvent extensionEvent, ExtensionRegistry.ExtensionType type)
      Register a extension event
      Parameters:
      type - the WebAppType to which the ctx belongs. Not allowed to be null
      Throws:
      IllegalStateException - if the extension already has been registered by its hst root
    • unregister

      public static void unregister(String hstRoot)
      Unregister extension
      Parameters:
      hstRoot - the hst root to unregister
      Throws:
      IllegalStateException - if the extension has not been registered by its hst root
    • getExtension

      public static ExtensionEvent getExtension(String hstRoot)
      Parameters:
      hstRoot - The hst root for which of the extension
      Returns:
      the extension registered under the extension's hst root
    • getHstRoots

      public static Map<String,ExtensionEvent> getHstRoots()
      Returns:
      unmodifiable map of all currently registered extensions mapped by their hst root