Session variable provider
Interface IPluginSessionReplacer
Use cases
Session variables are a special kind of system variables, which are used only when returning HTML templates to the client. Session variables are evaluated after all other variables have been evaluated. It is used for data valid only for the current session such as temporary links.
Session variables have got the following syntax:
[%$<variableName>%]
Methodensignaturen
IPluginSessionReplacerRetVal replace(IPluginSessionReplacerParams params) throws FCPluginException
Parameters
An object of type IPluginSessionReplacerParams is passed to the execute method, providing access to the following properties:
- The entire variable string, including its syntax, eg. [%LINK%}. (getPlaceholder())
- The variable name, without its syntax, eg. LINK. (getPlaceholderContent())
- The current form record, providing access to attachements, the form, etc. (getVorgang())
- The current user context for accessing the databases. (getEntityContext())
- The current session id. (getSessionId())
- The context name of the application. (getContextName())
Return value
The execute method must return an object implementing IPluginSessionReplacerRetVal.
The class PluginGenericReplacerRetVal provides a reference implementation. Its constructor takes the string containing the evaluated value of the variable.