Interface ClientModuleHook
- All Known Subinterfaces:
ClientModuleHook
- All Known Implementing Classes:
AbstractClientModuleHook
,AbstractClientModuleHook
,ModuleHook
,ReportingClientHook
,SFCClientHook
public interface ClientModuleHook
The main hook into a module's client scope. Each module should provide exactly one implementation of this hook class
if the module includes client-scoped logic. The name of this implementation must be included in the module's
descriptor file, with an entry like:
<hook scope="C">com.example.module.client.SuperHookClass</hook>
Best practice: Instead of implementing this interface directly, subclass your hook class from
AbstractClientModuleHook
instead.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureDeserializer
(XMLDeserializer deserializer) Called when an XMLDeserializer is created.void
Provides the module with an opportunity to define its own expression functionsAllows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.void
initializeScriptManager
(ScriptManager manager) Initialize a newly-instantiated script manager.void
notifyActivationStateChanged
(LicenseState licenseState) Notifies this client module that its license state has changed.void
shutdown()
Called when the module is shut down.void
startup
(ClientContext context, LicenseState activationState) The main entrypoint for the module hook.
-
Method Details
-
startup
The main entrypoint for the module hook. This will only be called once for a given project. If another project is ever opened,shutdown()
will be called and a new hook will be instantiated- Throws:
Exception
- if the module was not able to be initialized for the given project.
-
shutdown
void shutdown()Called when the module is shut down. -
configureDeserializer
Called when an XMLDeserializer is created. Gives the module a chance to add custom deserialization delegates to the deserializer. -
notifyActivationStateChanged
Notifies this client module that its license state has changed. Note that if the trial mode expires, the entire client will automatically time out, so client modules don't typically need to worry about trial mode. -
initializeScriptManager
Initialize a newly-instantiated script manager. This will be called exactly once for any given ScriptManager instance. Usually this will involve callingScriptManager.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. -
configureFunctionFactory
Provides the module with an opportunity to define its own expression functions -
createPermissionKeys
Allows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.- Returns:
- Map of id-bundlekey entries. May be null or empty.
-