Data privacy notice

 

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

 

             

Pre-persist

Modified on Mon, 16 Jan, 2023 at 10:58 PM


Interface: IPluginFormPrePersist

Placement of the PrePersist plugin in the FORMCYCLE process chain.


Uses

Provides a way to build in a custom check if data should be saved. 

If not, then an abort of further data processing can be caused at this point.


When using multiple Form PrePersists implementations, the order in which they are executed is not fixed. The order may therefore be different each time.


The Form-PrePersistors are basically executed before each form call in the respective application area (system or client plug-in) in which they were installed. It is recommended to first check in the implementation logic whether the PrePersistierer should be executed for the respective form processing. This can be made configurable, for example, by using Bundle-Properties.


Method signatures

IPluginFormPrePersistRetVal execute(IPluginFormPrePersistParams params) throws FCPluginException

Transfer value: The IPluginFormPrePersistParams type provides access to the IFormRequestContext interface with the getFormRequestContext() method and thus to the following properties: 
  • getCurrentUser(): the current user. 
  • getUserContext(): the current user context, for example to be able to perform database operations 
  • getProject(): the current project 
  • getMandant(): the current client 
  • getTask(): the current task 
  • getFormVersion(): the current version of the form with access to all contained form elements 
  • getLocale(): information about the currently selected language and region 
  • getSessionAttributeMap(): a map with the current session parameters 
  • getFrontendServer(): access to the frontend server object if called via frontend server 

Return values: The return value must be of type IPluginFormPrePersistRetVal. A reference implementation is provided by the class PluginGenericFormProcessingRetVal. On initialisation, this expects a boolean value.

  • true
    Further processing in FORMCYCLE is continued. 
  • false
    Further processing in FORMCYCLE is aborted.

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