Create Hooks for MultiServiceAppHandler

The Multisite APIs provide an option to write custom pre- and post-hooks for each API to implement custom logic. A pre-hook is run before the actual API runs. A post-hook runs after the actual API runs.

  1. Write the custom class to implement the pre and post hook.

    Example code:

  2. Create the interface implementation.

    1. From the App Launcher, click Interface Implementations.

    2. Click New.

    3. In the New Interface Implementation dialog, enter the following:

      • Interface Name: MSAppHandlerHookInterface

      • Active Implementation Class: MSCustomHookImplementation (Name of Custom Class)

    4. Click Save.

  3. Create a new Interface Implementation Detail for the interface created above.

    1. On the Related tab for your new custom interface implementation, click New.

    2. In the New Interface Implementation Detail dialog, enter MSCustomHookImplementation for Available Implementation.

    3. Click Active to make this implementation the active implementation.

    4. Click Save.