Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Placeholder substitution (session)

Modified on Mon, 17 Jul, 2023 at 9:10 AM


Interface IPluginSessionReplacer


Uses

Placement of the placeholder replacement plugin of session parameters in the process chain of FORMCYCLE

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.

The placeholder substitution searches for the following pattern and replaces it with the corresponding value:


[%$<placeholder name>%]

When using multiple SessionReplacer implementations, the order in which they are executed is not fixed. Therefore, the order may be different each time.


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.


Method signatures

The plugin interface IPluginSessionReplacer references all methods provided by the base interface IFCPlugin.
and additionally the following plugin-specific method signatures:

IPluginSessionReplacerRetVal replace(IPluginSessionReplacerParams params) throws FCPluginException

Transfer value: The IPluginSessionReplacerParams type provides access to the following properties: 
  • getPlaceholder() complete string of the placeholder (this includes the markup of the placeholder). 
  • getPlaceholderContent() content of the placeholder (without type-specific markup) 
  • getEntityContext() current user context, for example to be able to perform database operations 
  • getTask() the current session 
  • getSessionId() the session ID 
  • getContextName() the context name of the application

return values: 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.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article