Interface IPluginFormPreRender
-
- All Superinterfaces:
IFCPlugin
,IFormLifecyclePlugin
,INamedUiElement
,INameProviding
,ITransferable
,Serializable
public interface IPluginFormPreRender extends IFormLifecyclePlugin
Interface for form pre-render plugins. This plugin is run when a user requests a form. It may prevent the user from accessing the form, in which case the user gets a general error page that the form could not be found. This plugin may also fetch data from eg. a webservice and make data available to the form; either as a JavaScript object or by pre-filling form fields.- 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 IPluginFormPreRenderRetVal
execute(IPluginFormPreRenderParams params)
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, validateConfigurationData
-
-
-
-
Method Detail
-
execute
IPluginFormPreRenderRetVal execute(IPluginFormPreRenderParams params) throws FCPluginException
Main method of this plugin. Performs the logic to be run before the form is rendered. This plugin may also prevent to form from being delivered to the user. If it does, the user receives a general error page.When any exception other than
FCPluginException
is thrown, the form will not be rendered and a general error template is returned to the user who attempted to open the form.- Parameters:
params
- The parameters this plugin may make use of. Contains theIFormRequestContext
that can be used, for example, to access the current form, the current form data, or the URL parameters.- Returns:
- The return value of this plugin that contains (a) whether the the user should be block from accessing the form and (b) the data to be made available to the form
- Throws:
FCPluginException
- May be throw when this plugin cannot perform its task due to any reason. Please note that throwing this exception will not prevent the form from being rendered and sent to the browser.
-
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.
-
-