... |
... |
@@ -1,31 +1,25 @@ |
1 |
1 |
{{content/}} |
2 |
2 |
|
3 |
|
-**[[Download demo project for this plugin type>>url:https://customer.formcycle.eu/index.php/s/TysXcyTvPsyxWh8||rel="noopener noreferrer" target="_blank"]]** |
4 |
|
- |
5 |
5 |
== IPluginGeneric == |
6 |
6 |
|
7 |
|
-=== Uses === |
|
5 |
+=== Use cases === |
8 |
8 |
|
9 |
|
-The generic plugin is not included in any process chain of {{formcycle case="dat"/}}. |
10 |
|
-The //execute// method provided by the plugin must therefore be addressed by its own logic. |
11 |
|
-Plugins of this type are instantiated during the registration process and removed from the running system during the de-registration process. |
|
7 |
+Generic plugins are not executed by {{formcycle/}} directly, but they could be called by other plugins. |
12 |
12 |
|
|
9 |
+As with plugins, generic plugin will be initialized when they are registered, which allows generic plugins to execute custom code during the initialization process. To do so, override the method //initPlugin//. |
13 |
13 |
|
14 |
|
-This plugin type is therefore suitable for making file resources from the plugin bundle available in the {{formcycle/}} system, for example. |
15 |
|
-Furthermore, resources that are no longer required can be removed from the system when the plug-in bundle is uninstalled. |
16 |
|
-All necessary interfaces are provided by the [[Base interface IFCPlugin>>doc:IFCPlugin]]. |
|
11 |
+=== Method signature === |
17 |
17 |
|
18 |
|
-=== Method signatures === |
|
13 |
+{{code language="java"}} |
|
14 |
+IPluginGenericRetVal execute(IPluginGenericParams params) throws FCPluginException |
|
15 |
+{{/code}} |
19 |
19 |
|
20 |
|
-{{panel title="{{code language='java'~}~}IPluginGenericRetVal execute(IPluginGenericParams params) throws FCPluginException{{/code~}~}" triggerable="true" fullwidth="true"}} |
21 |
|
-((( |
22 |
|
-**Transfer values:** |
|
17 |
+== Parameters == |
23 |
23 |
|
24 |
|
-* The //IPluginGenericParams// type provides the following properties: |
25 |
|
-** **getParameterMap():** a map with parameters in serialised form. |
26 |
|
-))) |
27 |
|
-**Return values:** |
28 |
|
-((( |
29 |
|
-Return values must be of type //IPluginGenericRetVal//, a reference implementation is provided by the //PluginGenericRetVal// class. A map with serialisable content can be passed to this object in the constructor. |
30 |
|
-))) |
31 |
|
-{{/panel}} |
|
19 |
+An object of type {{jpath path="de.xima.fc.interfaces.plugin.param.generic.IPluginGenericParams"/}} will be passed to the executed method, providing access to a map containing the plugin parameters. |
|
20 |
+ |
|
21 |
+== Return value == |
|
22 |
+ |
|
23 |
+The execute method must return an object implementing {{jpath path="de.xima.fc.interfaces.plugin.retval.generic.IPluginGenericRetVal"/}}. |
|
24 |
+ |
|
25 |
+The class {{jpath path="de.xima.fc.plugin.models.retval.generic.PluginGenericRetVal"/}} provides a reference implementation. Its constructor takes a map with serializable data. |