Class HookMgr
This class provides functionality to call hooks. A hook is an extension point in the business logic, where you can register scripts to customize functionality.
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| static callHook(String, String, Object...) | Calls a hook on base of the specified extensionPoint and function. |
| static hasHook(String) | Checks whether a hook is registered or a system default implementation exists for this extension point. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- static callHook(extensionPoint: String, function: String, args: Object...): Object
Calls a hook on base of the specified extensionPoint and function. If a hook throws an exception, then this method will also throw an exception. If no hook and no system default implementation is provided, then this method will return undefined.
Sample:
Parameters:
- extensionPoint - the extension point to call
- function - the script function to call
- args - the Array of function parameters
Returns:
- the object returned by the hook or undefined
- static hasHook(extensionPoint: String): Boolean
Checks whether a hook is registered or a system default implementation exists for this extension point.
extensionPoint refers to the same name used to register a script as implementation. With this method it's only possible to check for a whole script registered but it is not possible to check, whether an individual function is implemented.
Sample:
Parameters:
- extensionPoint - the extension point
Returns:
- true, if a hook is registered or a default implementation exists, otherwise false