Interface IPluginServletAction

All Superinterfaces:
IFCPlugin, INamedUiElement, INameProviding, ITransferable, Serializable
All Known Subinterfaces:
IPluginStaticResourceServletAction
All Known Implementing Classes:
APluginStaticResourceServletAction

public interface IPluginServletAction extends IFCPlugin
Interface for plugins servlet action plugins. A servlet action plugin is called in response to a HTTP request to a certain URL. The plugin may perform any arbitrary logic and send a response to the HTTP request. It can be used, for example, to serve resources (statically or dynamically) or to trigger certain actions within the system from the outside.

Assuming formcycle runs on the URL https://example.com/formcycle, the URL to a servlet plugin looks as follows:

 http://example.com/formcycle/plugin?name=PLUGIN-NAME&client-id=CLIENT_ID
 
The given PLUGIN-NAME determines which servlet action is executed. The PLUGIN-NAME must be the IFCPlugin.getName() of the plugin. The CLIENT_ID must be the ID of the client where the plugin was installed. It must be omitted in case the plugin was installed as a system plugin. When no servlet plugin with the given name exists, a general error response is returned.
Author:
XIMA MEDIA GmbH
  • Method Details

    • execute

      The main method of this plugin.

      When any exception other than FCPluginException is thrown, a generic HTML error page is returned to the client.

      Parameters:
      params - The parameters this plugin may make use of. Contains for example the URL parameters, the data of the HttpSession or the current user.
      Returns:
      The HTTP response code and the data to be sent as the response.
      Throws:
      FCPluginException - May be thrown when this plugin cannot handle the request. When this exception is thrown, a 404 HTTP response is returned to the client.