Interface IPluginFormPreRespond
-
- All Superinterfaces:
IFCPlugin
,IFormLifecyclePlugin
,INamedUiElement
,INameProviding
,ITransferable
,Serializable
public interface IPluginFormPreRespond extends IFormLifecyclePlugin
Interface for a form pre-respond plugin. This plugin is executed when the form is submitted, after aFormEingang
was created workflow processing was run; and immediately before the HTTP response is about to be sent to the browser. Contrast this with a plugin of typeIPluginFormPrePersist
, which is run before aFormEingang
is created; and toIPluginFormPreProcess
, which is run before processing the workflow.This plugin can be used, for example, to prevent the response from being sent to the user and display an empty page. It can also be used to modify or add HTTP session attributes; or to perform additional logic such as sending the data to a third-party web service.
- 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 IPluginFormPreRespondRetVal
execute(IPluginFormPreRespondParams 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
IPluginFormPreRespondRetVal execute(IPluginFormPreRespondParams params) throws FCPluginException
The main method of this plugin. Performs any additional actions before the response is sent to the browser.When any exception other than
FCPluginException
is thrown, the response will not be sent to the browser and a general error template is returned to the user who submitted the form.- Parameters:
params
- The parameters this plugin may make use of. Contains for example the currentProjekt
, the currentFormEingang
, session parameters.- Returns:
- Whether the response should be sent to the browser (or just show a generic error page); and which HTTP session parameters should be modified.
- 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 response from being sent.
-
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.
-
-