Wiki source code of Platzhalterersetzung (Session)


Hide last authors
gru 1.1 1 {{content/}}
2
fse 2.1 3 == Interface IPluginSessionReplacer ==
gru 1.1 4
fse 2.1 5 === Uses ===
gru 1.1 6
fse 2.1 7 {{figure image="plugin_platzhalterersetzung_session_en.png" width="400" clear="h3"}}
8 Placement of the placeholder replacement plugin of //session// parameters in the process chain of {{formcycle case="dat"/}}
gru 1.1 9 {{/figure}}
10
fse 2.1 11 The session placeholder replacer is a special form of the system placeholder replacer, which is applied when a template is delivered to the browser. It is executed after all other placeholder replacements and is used to insert values that should only be valid within a form session, e.g. time-limited links.
gru 1.1 12
fse 2.1 13 The placeholder substitution searches for the following pattern and replaces it with the corresponding value:
gru 1.1 14
15 {{code language="none"}}
fse 2.1 16 [%$<placeholder name>%]
gru 1.1 17 {{/code}}
18
19 {{warning}}
fse 2.1 20 When using multiple SessionReplacer implementations, the order in which they are executed is not fixed. Therefore, the order may be different each time.
gru 1.1 21 {{/warning}}
22
23 {{warning}}
fse 2.1 24 The SessionReplacer implementations are basically executed with each template delivery in the respective application area (system or client plug-in) in which they were installed. It is therefore recommended to first check within the implementation logic whether the //SessionReplacer// should be executed for the current process processing. This can be made configurable, for example, by using //Plugin-Properties//.
gru 1.1 25 {{/warning}}
26
fse 2.1 27 === Method signatures ===
gru 1.1 28
fse 2.1 29 The plugin interface //IPluginSessionReplacer// references all methods provided by the [[base interface IFCPlugin>>doc:IFCPlugin]].
30 and additionally the following plugin-specific method signatures:
gru 1.1 31
32 {{panel title="{{code language='java'~}~}IPluginSessionReplacerRetVal replace(IPluginSessionReplacerParams params) throws FCPluginException{{/code~}~}" triggerable="true" fullwidth="true"}}
33
fse 2.1 34 **Transfer value.
35 The //IPluginSessionReplacerParams// type provides access to the following properties:
36 * **getPlaceholder()** complete string of the placeholder (this includes the markup of the placeholder).
37 * **getPlaceholderContent()** content of the placeholder (without type-specific markup)
38 * **getEntityContext()** current user context, for example to be able to perform database operations
39 * **getTask()** the current session
40 * **getSessionId()** the session ID
41 * **getContextName()** the context name of the application
gru 1.1 42
fse 2.1 43 **return values:**
44 The return value must be of type //IPluginSessionReplacerRetVal//. A reference implementation is provided by the //PluginGenericReplacerRetVal// class, which shall be initialised with the generated replacement value.
gru 1.1 45 {{/panel}}