public interface GatewayModuleHook
<hook scope="G">com.example.module.gateway.SuperHookClass</hook>
Best practice: Instead of implementing this interface directly, subclass your hook class
from AbstractGatewayModuleHook
instead.
Modifier and Type | Method and Description |
---|---|
void |
configureDeserializer(XMLDeserializer deserializer)
Provides the module a chance to configure the deserializer with any custom handlers
|
void |
configureFunctionFactory(ExpressionFunctionManager factory)
Provides the module with an opportunity to define its own expression functions
|
void |
configureSerializer(XMLSerializer serializer)
Provides the module a chance to add serialization delegates to the serializer custom for
classes that might be encountered when serializing objects provided by this module
|
default java.util.List<ConfigCategory> |
getConfigCategories()
A list (may be null or empty) of custom config categories needed by any panels returned
by
getConfigPanels() |
default java.util.Optional<ConfigOverviewContributor> |
getConfigOverviewContributor()
Implement this method to contribute meta data to the Configure section's Overview page.
|
default java.util.List<? extends IConfigTab> |
getConfigPanels()
A list (may be null or empty) of panels to display in the config section.
|
java.util.List<? extends IHomepagePanelDescriptor> |
getHomepagePanels()
A list (may be null or empty) of homepage panels that this module provides
|
default java.util.Optional<java.lang.String> |
getMountedResourceFolder() |
default java.util.Optional<java.lang.String> |
getMountPathAlias()
Used by the mounting underneath /main/res/module-id/* and /main/data/module-id/* as an alternate mounting path
instead of your module id, if present.
|
java.lang.Object |
getRPCHandler(ClientReqSession session,
java.lang.Long projectId)
A class whose functions will become exposed automatically through reflection to the Designer
and the Client
through RPC
|
default java.util.Optional<OverviewContributor> |
getStatusOverviewContributor()
Implement this method to contribute meta data to the Status section's Systems / Overview page.
|
java.util.List<? extends INamedTab> |
getStatusPanels()
A list (may be null or empty) of panels to display in the status section
|
void |
initializeScriptManager(ScriptManager manager)
Initialize a newly-instantiated script manager.
|
default boolean |
isFreeModule() |
default void |
mountRouteHandlers(RouteGroup routes)
Provides a chance for the module to mount any route handlers it wants.
|
void |
notifyLicenseStateChanged(LicenseState licenseState)
Notify module hook when the license state has changed.
|
void |
setup(GatewayContext context)
Called to before startup.
|
void |
shutdown()
Called to shutdown this module.
|
void |
startup(LicenseState activationState)
Called to initialize the module.
|
default void |
updateSystemMap(SystemMap map)
Deprecated.
Instead, see getStatusOverviewContributor
|
void setup(GatewayContext context)
void startup(LicenseState activationState)
void shutdown()
java.lang.Object getRPCHandler(ClientReqSession session, java.lang.Long projectId)
void notifyLicenseStateChanged(LicenseState licenseState)
java.util.List<? extends IHomepagePanelDescriptor> getHomepagePanels()
java.util.List<? extends INamedTab> getStatusPanels()
default java.util.List<? extends IConfigTab> getConfigPanels()
getConfigCategories()
will
not be shown.default java.util.List<ConfigCategory> getConfigCategories()
getConfigPanels()
void configureSerializer(XMLSerializer serializer)
void configureDeserializer(XMLDeserializer deserializer)
void configureFunctionFactory(ExpressionFunctionManager factory)
@Deprecated default void updateSystemMap(SystemMap map)
void initializeScriptManager(ScriptManager manager)
ScriptManager
instance. Usually this will involve calling
ScriptManager.addScriptModule(String, Object)
, which reflectively loads the public
(instance and static) java functions from the given object into the scripting environment, at
the provided path.
This function may be called before startup(LicenseState)
, but never before
setup(GatewayContext)
.
default java.util.Optional<java.lang.String> getMountedResourceFolder()
default void mountRouteHandlers(RouteGroup routes)
RouteGroup
for details.
Will be called after startup().default java.util.Optional<java.lang.String> getMountPathAlias()
default boolean isFreeModule()
true
if this is a "free" module, i.e. it does not participate in the licensing system. This is
equivalent to the now defunct FreeModule attribute that could be specified in module.xml.default java.util.Optional<OverviewContributor> getStatusOverviewContributor()
default java.util.Optional<ConfigOverviewContributor> getConfigOverviewContributor()