Interface IPluginServletActionParams

All Superinterfaces:
IPluginParameters, Serializable
All Known Implementing Classes:
PluginServletActionParams

public interface IPluginServletActionParams extends IPluginParameters, Serializable
Interface for the parameters of a servlet action plugin.
Author:
XIMA MEDIA GmbH
  • Method Details

    • getAction

      EServletAction getAction()
      Returns:
      The HTTP method of the servlet request.
    • getBackendUser

      IUser getBackendUser()
      Gets the BACKEND user that made the request to the plugin action servlet.
      Returns:
      The form user, if any, or null otherwise.
      Since:
      8.4.0
    • getBaseUrl

      String getBaseUrl()
      Returns the HTTP request base URL. This is the URL from the scheme, domain until with context path, including the trailing slash. This is the value you could use in HTML <base> tag in an XHTML view.
      Returns:
      The HTTP request base URL.
      Since:
      8.0.0
      See Also:
      • HttpServletRequest.getRequestURI()
      • HttpServletRequest.getRequestURL()
      • HttpServletRequest.getContextPath()
    • getBenutzer

      @Deprecated Benutzer getBenutzer()
      Deprecated.
      Use getUser() instead.
      Returns:
      The Benutzer from the current XfcSession who called the servlet action plugin.
      Since:
      5.0
    • getClientId

      Long getClientId()
      Gets the ID of the client scope where the servlet action plugin was called, if any.
      Returns:
      The client ID; or null if no client scope is available.
    • getContextPath

      String getContextPath()
      Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.

      It is possible that a servlet container may match a context by more than one context path. In such cases this method will return the actual context path used by the request, and it may differ from the path returned by the ServletContext.getContextPath() method. The context path returned by ServletContext.getContextPath() should be considered as the prime or preferred context path of the application.

      Returns:
      a String specifying the portion of the request URI that indicates the context of the request
      Since:
      8.0.0
      See Also:
      • HttpServletRequest.getContextPath()
    • getFormRecordId

      Long getFormRecordId()
      Gets the ID of the form record scope where the servlet action plugin was called, if any.
      Returns:
      The form record ID; or null if no form record scope is available.
    • getFormUser

      IUser getFormUser()
      Gets the FORM user that made the request to the plugin action servlet. Requires the frid (form request ID) parameter to be included in the request parameters.
      Returns:
      The form user, if any, or null otherwise.
      Since:
      8.4.0
    • getFormVersionId

      Long getFormVersionId()
    • getFrontendServer

      FrontendServer getFrontendServer()
      Returns:
      The current FrontendServer to which the servlet request was made, or null if the request was made directly to the master server.
    • getFrqSessionAttributes

      Map<Serializable, Serializable> getFrqSessionAttributes()
      Gets the values stored in the current FRQSession. The servlet plugin may be executed on a different server that does not have direct access to the HTTP request: Please note that changes to this map are NOT reflected or saved in the FRQSession. To modify the FRQ session attributes, use the IPluginServletActionRetVal.getFrqSessionAttributeMap() return value.
      Returns:
      Attributes from the form request session of the current request. If no such session exists, this is an empty map.
      Since:
      7.0.13
      See Also:
    • getFrqSessionId

      String getFrqSessionId()
      Gets the ID of the current form request session, if such a session exists.
      Returns:
      The ID of the current FRQ (form request) session, if such a session exists.
      Since:
      8.0.0
      See Also:
    • getHeaderMap

      Map<String,String> getHeaderMap()
      Returns:
      A Map that contains the HTTP header parameters. The map is case-insensitive, i.e. you can access a header with the key "Content-Type" as well as "content-type" etc.
    • getLocale

      Locale getLocale()
      Returns:
      The current Locale of the request; or the default locale in case no locale could be determined.
    • getPluginClient

      Mandant getPluginClient()
      Returns:
      The Mandant to which the servlet action plugin belongs to; or null in case the plugin was installed as a system plugin and no client was provided in the servlet action URL.
      Since:
      5.1.0
    • getProjectId

      Long getProjectId()
      Gets the ID of the project scope where the servlet action plugin was called, if any.
      Returns:
      The project ID; or null if no project scope is available.
    • getRemoteAddr

      String getRemoteAddr()
      Returns the Internet Protocol (IP) address of the client that sent the request. This will first check the Forwarded and X-Forwarded-For request headers and if any is present, then return its first IP address, else just return ServletRequest.getRemoteAddr() unmodified.
      Returns:
      The IP address of the client.
      Since:
      8.0.0
      See Also:
      • ServletRequest.getRemoteAddr()
    • getRequestBodyInputStream

      InputStream getRequestBodyInputStream()
      Gets a new input stream for the HTTP request body. This input stream will be empty if the content type is either "application/x-www-form-urlencoded" or "multipart/form-data". In these cases, use getRequestParameters() to access the text parameters and getUploadFiles() to access the uploaded files.

      The caller is responsible to close the input stream after use.

      Returns:
      The InputStream of the HTTP request body.
    • getRequestParameters

      Map<String, List<String>> getRequestParameters()
      The parameters from the HTTP request. This includes both URL parameters and POST parameters, but excluded uploaded files. Please note that multiple values may have been given for a URL or POST parameter, e.g. http://example.com?foo=bar&foo=baz. Also, for some HTTP methods such as EServletAction.DELETE, you may have to parse the HTTP request body yourself.
      Returns:
      A Map with the parameters from the HttpServletRequest.
      See Also:
    • getRequestUri

      String getRequestUri()
      Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. The web container does not decode this String. For example:
      Examples of returned values
      First line of HTTP request Returned Value
      POST /some/path.html HTTP/1.1 /some/path.html
      GET http://foo.bar/a.html HTTP/1.0 /a.html
      HEAD /xyz?a=b HTTP/1.1 /xyz
      Returns:
      a String containing the part of the URL from the protocol name up to the query string
      Since:
      8.0.0
      See Also:
      • HttpServletRequest.getRequestURI()
    • getRequestUrl

      String getRequestUrl()
      Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

      If this request has been forwarded using RequestDispatcher.forward(ServletRequest, ServletResponse), the server path in the reconstructed URL must reflect the path used to obtain the RequestDispatcher, and not the server path specified by the client.

      Returns:
      a StringBuffer object containing the reconstructed URL
      Since:
      8.0.0
      See Also:
      • HttpServletRequest.getRequestURL()
    • getSessionAttributeMap

      Map<String, Serializable> getSessionAttributeMap()
      Gets the values from the current HttpSession. The servlet plugin may be executed on a different server that does not have direct access to the HTTP request: Please note that changes to this map are NOT reflected or saved in the HttpSession. To modify the session attributes, use the IPluginServletActionRetVal.getSessionAttributeMap() return value.
      Returns:
      A map Map with all attributes of the current HttpSession.
      Since:
      5.0
    • getSessionAttributes

      @Deprecated SessionAttributes getSessionAttributes()
      Deprecated.
      Returns:
      All serializable session attributes.
    • getSessionID

      String getSessionID()
      Returns:
      The session ID for the user who is currently logged in; or null in case no session ID is available (which may happen, for example, when the user is not logged in).
      Since:
      5.1.0
    • getUploadFiles

      Map<String, List<FileData>> getUploadFiles()
      Returns:
      A Map between the name of an upload form element and the file(s) that were uploaded for that upload element.
    • getUser

      default IUser getUser()
      Deprecated.
      Returns:
      the user who called the servlet action plugin.
      Since:
      8.0.0
    • getValueParameters

      @Deprecated ValueParameters getValueParameters()
      Deprecated.
      Returns:
      All serializable session attributes.
    • getWorkflowVersionId

      Long getWorkflowVersionId()
      Gets the ID of the workflow version where the servlet action plugin was called, if any.
      Returns:
      The workflow version ID; or null if no workflow version scope is available.