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 Details

    • startup

      void startup(ClientContext context, LicenseState activationState) throws Exception
      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

      void configureDeserializer(XMLDeserializer deserializer)
      Called when an XMLDeserializer is created. Gives the module a chance to add custom deserialization delegates to the deserializer.
    • notifyActivationStateChanged

      void notifyActivationStateChanged(LicenseState licenseState)
      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

      void initializeScriptManager(ScriptManager manager)
      Initialize a newly-instantiated script manager. This will be called exactly once for any given 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.
    • configureFunctionFactory

      void configureFunctionFactory(ExpressionFunctionManager factory)
      Provides the module with an opportunity to define its own expression functions
    • createPermissionKeys

      Map<String,String> 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.