Hide last authors
nlo 1.1 1 == IFCPlugin ==
2
fse 2.1 3 === Meaning ===
nlo 1.1 4
5 {{info}}
fse 2.1 6 The interface **IFCPlugin** provides general functions to control the plugin life cycle. The interface does not need to be included directly when developing your own plugins, as it is referenced as a "base interface" in all other plugin interfaces.
nlo 1.1 7 {{/info}}
8
fse 2.1 9 == Method signatures ==
nlo 1.1 10
11 {{panel title="{{code language='java'~}~}String getName(){{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 12 Returns the name of the plugin: this must be unique within the {{formcycle/}} system.
nlo 1.1 13 {{/panel}}
14
15 {{panel title="{{code language='java'~}~}default String getDisplayName(Locale locale){{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 16 Returns the display name of the plugin depending on the given {{code}}Locale{{/code}}. This method does not need to be implemented, but allows the internationalisation of the plugin. If this method is not implemented, the display name corresponds to the name of the plug-in.
nlo 1.1 17 {{/panel}}
18
19 {{panel title="{{code language='java'~}~}default String getDescription(Locale locale){{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 20 Returns the description of the plugin depending on the given {{code}}Locale{{/code}}. The implementation of this method is optional.
nlo 1.1 21 {{/panel}}
22
23 {{panel title="{{code language='java'~}~}default String getDescription(){{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 24 {{info}}Deprecated, the {{code}}getDescription(Locale locale){{/code}} method should be used.{{/info}}
nlo 1.1 25
fse 2.1 26 A description of the plugin, which is displayed on the plugin bundle registration pages and in the case of promotion plugins in the configuration panel.
nlo 1.1 27 {{/panel}}
28
29
30 {{panel title="{{code language='java'~}~}default void install(IPluginInstallData installData) throws FCPluginException{{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 31 This method is called by {{formcycle case="FORMCYCLE"/}} during the plugin installation process and allows functionality to be executed,
32 which should only be executed once, when the plugin is newly registered in the system.
nlo 1.1 33
34 (((
35 ; IPluginInstallData installData
fse 2.1 36 : implements the interface [[__IPluginDefaultLifecycleData__>>doc:||anchor="HSchnittstelleIPluginDefaultLifecycleData" target="_self"]]
nlo 1.1 37 )))
38 {{/panel}}
39
40
41 {{panel title="{{code language='java'~}~}default void initialize(IPluginInitializeData initializeData) throws FCPluginException{{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 42 This method is executed by {{formcycle case="FORMCYCLE"/}} whenever the plugin object is newly instantiated. This can happen at different times:
nlo 1.1 43
fse 2.1 44 * when an existing plugin is updated, or when changes to bundle properties are saved.
45 * when the FORMCYCLE system is restarted
46 * if the plugin should be registered in the client scope, the momentary failure and the associated recovery of the database connection can also trigger a re-initialisation
nlo 1.1 47
fse 2.1 48 IPluginInitializeData initializeData
49 : implements the interface [[__IPluginDefaultLifecycleData__>>doc:||anchor="HSchnittstelleIPluginDefaultLifecycleData" target="_self"]] 
nlo 1.1 50 {{/panel}}
51
52
53 {{panel title="{{code language='java'~}~}default void shutdown(IPluginShutdownData shutdownData) throws FCPluginException{{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 54 This method is called when a plugin is shut down.
nlo 1.1 55
fse 2.1 56 * when an existing plugin is updated, or when changes to bundle properties are saved.
57 * when the FORMCYCLE system is restarted
58 * if the plugin should be registered in the client scope, the temporary loss of the database connection can also trigger a call of the method
59 * if an existing plugin is deleted from the system.
nlo 1.1 60
fse 2.1 61 IPluginShutdownData shutdownData
62 : Implements the interface [[__IPluginDefaultLifecycleData__>>doc:||anchor="HSchnittstelleIPluginDefaultLifecycleData" target="_self"]] 
nlo 1.1 63 {{/panel}}
64
65
66 {{panel title="{{code language='java'~}~}default uninstall(IPluginUninstallData uninstallData) throws FCPluginException{{/code~}~}" triggerable="true" initial="hidden" fullwidth="true"}}
fse 2.1 67 This method is called by {{formcycle case="FORMCYCLE"/}} when the plugin is uninstalled and allows it to perform functionality,
68 which should only be executed once when the plugin is removed from the system.
nlo 1.1 69
fse 2.1 70 IPluginUninstallData uninstallData
71 : Implements the interface [[__IPluginDefaultLifecycleData__>>doc:||anchor="HSchnittstelleIPluginDefaultLifecycleData" target="_self"]]
nlo 1.1 72 {{/panel}}
73
fse 2.1 74 == Interface IPluginDefaultLifecycleData ==
nlo 1.1 75
fse 2.1 76 The interface provides the following methods:
nlo 1.1 77
fse 2.1 78 : **getScopeKey()**.
79 :: Returns information about the scope in which the plugin was installed. (The UUID of the client if registered in the client scope, otherwise "__system__" if plugin was registered in the system scope).
nlo 1.1 80 : **getRuntimeKey()**
fse 2.1 81 :: Returns the UUID under which the plugin was stored in the database.
82 : **getClient()**.
83 :: Returns the current client object, or __null__ if plugin was not registered in the scope of a client.
nlo 1.1 84 : **getProperties()**
fse 2.1 85 :: Enables access to the properties stored on the plug-in bundle.
86 : **getFileHelper()**.
87 :: Returns a helper object to support the work with plug-in files.
88 : **getResourceHelper()**.
89 :: Returns a helper object to work with language-specific resources.
90 : **getFrontendServer()**.
91 :: Returns the frontend server where the plugin is installed, or {{code language="none"}}null{{/code}} if it was installed on the master server.