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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtensionRegistry.ExtensionType
-
Constructor Summary
Constructors Constructor Description ExtensionRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExtensionEvent
getExtension(String hstRoot)
static Map<String,ExtensionEvent>
getHstRoots()
static void
register(ExtensionEvent extensionEvent, ExtensionRegistry.ExtensionType type)
Register a extension eventstatic void
unregister(String hstRoot)
Unregister extension
-
-
-
Method Detail
-
register
public static void register(ExtensionEvent extensionEvent, ExtensionRegistry.ExtensionType type)
Register a extension event- Parameters:
type
- theWebAppType
to which thectx
belongs. Not allowed to benull
- 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
-
-