Pre-persist


Interface: IPluginFormPrePersist

Placement of the PrePersist plugin in the Xima® 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 Xima® Formcycle is continued.
false
Further processing in Xima® Formcycle is aborted.