Interface IPluginFormPreProcess
-
- All Superinterfaces:
IFCPlugin
,IFormLifecyclePlugin
,INamedUiElement
,INameProviding
,ITransferable
,Serializable
public interface IPluginFormPreProcess extends IFormLifecyclePlugin
Interface for a form pre-process plugin. This plugin is executed when the form is submitted, after aFormEingang
with the submitted form values was created and just before the workflow processing is about to start. Contrast this with a plugin of typeIPluginFormPrePersist
, which is run before aFormEingang
is created; and toIPluginFormPreRespond
, which is run after the workflow was processed.This plugin may prevent the workflow from being executed, in which case the a generic error page is returned to the user. You might use this plugin to have the submitted form data saved to the database, but prevent the workflow from being executed, or you could perform additional business logic.
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
CONFIG_FILENAME
-
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IPluginFormPreProcessRetVal
execute(IPluginFormPreProcessParams params)
The main method of this plugin.default boolean
shouldExecute(IFormLifecycleShouldExecuteParams params)
Optional test to decide whether a form lifecycle plugin should be executed for a particular form request.-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall
-
-
-
-
Method Detail
-
execute
IPluginFormPreProcessRetVal execute(IPluginFormPreProcessParams params) throws FCPluginException
The main method of this plugin. Performs any additional actions before workflow processing starts.When any exception other than
FCPluginException
is thrown, further workflow actions are not processed and a general error template is returned to the user who submitted the form.- Parameters:
params
- The parameters this plugin may make use of. Gives you access, for example, to the currentVorgang
, or the currentProjekt
.- Returns:
- Whether the workflow processing should be run. If it is not run, a generic error page is returned to the user.
- Throws:
FCPluginException
- May be thrown when this plugin cannot perform is task due to any reason. Please note that throwing this exception will not prevent the workflow from being executed.
-
shouldExecute
default boolean shouldExecute(IFormLifecycleShouldExecuteParams params)
Description copied from interface:IFormLifecyclePlugin
Optional test to decide whether a form lifecycle plugin should be executed for a particular form request. Use e.g. params.getRequestContext()
.getRequestType()
to check the type of the request.Note: Lifecycle plugins may be queued for execution at points were they were not before. Implementations of this method should prefer narrow checks, e.g.
return params.getFormRequestContext().getRequestType() == EFormRequestType.PROVIDE}
instead ofreturn params.getFormRequestContext().getRequestType() != EFormRequestType.PROCESS
- Specified by:
shouldExecute
in interfaceIFormLifecyclePlugin
- Parameters:
params
- Parameters with the current form request.- Returns:
true
if the plugin should be executed during the lifecycle of the given form request,false
otherwise.
-
-