Servlet action


IPluginServletAction

Uses

Placement of the servlet plugin in the process chain of Xima® Formcycle

The plugin is used for servlet-related delivery of own content.

Please note

The plugin servlet implementation is called using the following URL pattern.
http://<Webdomain>/<FORMCYCLE-Webapplikation>/plugin/?name=<Name der IPluginServletAction-Implementierung>&client-id=<MandantId>
Instead of the parameter client-id, the parameter project-id can also be specified. If the project-id is specified, the client object necessary for processing is obtained from the determined project object.

Method signatures

The plug-in interface IPluginServletAction references all methods provided by the Base interface IFCPlugin
and additionally the following plugin-specific method signatures:

IPluginServletActionRetVal execute(IPluginServletActionParams params) throws FCPluginException

Transfer values. The IPluginServletActionParams type provides the following properties:
  • getRequestParameters(): a map with the currently passed request parameters (without uploads).
  • getUploadFiles(): a map with all uploaded files from the request
  • getHeaderMap(): a map with the header information from the request
  • getUser(): the user currently referenced in the session
  • getSessionAttributeMap(): the parameters currently present in the session
  • getLocale(): information about the currently set language and region
  • getFrontend-Server(): reference to the frontend server, if servlet plugin was called via frontend server
  • getAction(): type of servlet call
Return values: The return value must be of type IPluginServletActionRetVal, a reference implementation is provided by the PluginServletActionRetVal class.The object enables the return of an object of the type IServletResponse, which offers the possibility to deliver a simple string, but also binary data to the browser. By determining the Response type of the IServletResponse object, it is determined how the transferred response data is interpreted or delivered:
Response typeDescription
HTMLThe passed Response string is interpreted as finished HTML and delivered to the browser.
SHOW_FILEThe passed data (binary data and Response string) is delivered as a file download to the browser, where the content of the Response string is interpreted as a file name.
TEMPLATEA new HTML document is created and the passed Response string is taken as the content of the body element.
TEMPLATE_SYSTEMCurrently identical to TEMPLATE.
REFITThe passed Response string is interpreted as a URL and a redirect is performed.
If the plugin is processed incorrectly, an FCPluginException is thrown.