JSR223: Minor fixes
Signed-off-by: Florian Hotze <dev@florianhotze.com>pull/2636/head
parent
afe135e23b
commit
ded275fed6
|
|
@ -592,7 +592,7 @@ The `itemChannelLinkRegistry` does not provide the same methods as the [`org.ope
|
|||
All instances from this preset have an `addPermanent(...)` method, in addition to `add(...)`.
|
||||
With the `add(...)` method, elements added over the above instances are removed, when the script, which inserted the elements, is unloaded.
|
||||
When `addPermanent(...)` is used, the inserted elements `...` are not removed.
|
||||
`itemRegistry.addPermanent(...)`/`metadataRegistry.addPermanent(...)`/`thingRegistry.addPermanent(...)` from this preset offer the same functionality as `itemRegistry.add(...)`/`metadataRegistry.add(...)`/`things.add(...)` from the `default` preset.
|
||||
`itemRegistry.addPermanent(...)`/`thingRegistry.addPermanent(...)` from this preset offer the same functionality as `itemRegistry.add(...)`/`things.add(...)` from the `default` preset.
|
||||
|
||||
## `TriggerType` Objects
|
||||
|
||||
|
|
@ -734,10 +734,10 @@ Read the JSR223 language specific documentation for examples of using these `Tri
|
|||
When a script file is loaded, the `scriptLoaded(String)` function is invoked if it is defined.
|
||||
The path of the script file will be passed as parameter.
|
||||
Similarly, when a script file is unloaded, the `scriptUnloaded()` function is invoked if it is defined.
|
||||
Note that `scriptLoaded(String)` and `scriptUnloaded()` are only executed for script files - not Script Actions and Script conditions of rules.
|
||||
Note that `scriptLoaded(String)` and `scriptUnloaded()` are only executed for script files - not transformations, Script Actions or Script conditions of rules.
|
||||
Refer to the [Script Lifecycle](#script-lifecycle) section for more information on load and unload behavior.
|
||||
|
||||
[`lifecycleTracker`](#lifecycle-preset)'s `addDisposeHook(Disposable)` and the `scriptUnloaded()` function serve similar purposes, but it is recommended to use `addDisposeHook(Disposable)` as it's functionality is not limited to script files only.
|
||||
[`lifecycleTracker`](#lifecycle-preset)'s `addDisposeHook(Disposable)` and the `scriptUnloaded()` function serve similar purposes, but it is recommended to use `addDisposeHook(Disposable)` as its functionality is not limited to script files only.
|
||||
The `lifecyleTracker` also supports adding multiple dispose hooks, contrary to `scriptUnloaded()` that can only be defined once.
|
||||
|
||||
:::: tabs
|
||||
|
|
|
|||
Loading…
Reference in New Issue