Class PluginServletActionParams
java.lang.Object
de.xima.fc.plugin.models.params.servlet.PluginServletActionParams
- All Implemented Interfaces:
IPluginParameters, IPluginServletActionParams, Serializable
Default implementation of
IPluginServletActionParams with a builder.- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPluginServletActionParams(SessionAttributes sessionAttributes, HashMap<String, List<String>> valueParameter, HashMap<String, List<FileData>> uploadFiles, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs) Deprecated.PluginServletActionParams(Map<String, Serializable> httpSessionAttributes, Map<Serializable, Serializable> frqSessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, Benutzer user, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs, Mandant client, String sessionId) PluginServletActionParams(Map<String, Serializable> httpSessionAttributes, Map<Serializable, Serializable> frqSessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, IUser user, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs, Mandant client, String sessionId) Deprecated.Usebuilder().PluginServletActionParams(Map<String, Serializable> sessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, Benutzer benutzer, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Gets theBACKENDuser that made the request to the plugin action servlet.Returns the HTTP request base URL.Deprecated.UseIPluginServletActionParams.getUser()instead.Gets the ID of the client scope where the servlet action plugin was called, if any.Returns the portion of the request URI that indicates the context of the request.Gets the ID of the form record scope where the servlet action plugin was called, if any.Gets theFORMuser that made the request to the plugin action servlet.Gets the values stored in the currentFRQSession.Gets the ID of the current form request session, if such a session exists.Gets the ID of the project scope where the servlet action plugin was called, if any.Returns the Internet Protocol (IP) address of the client that sent the request.Gets a new input stream for the HTTP request body.The parameters from the HTTP request.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.Reconstructs the URL the client used to make the request.Deprecated.Deprecated.Deprecated.Gets the ID of the workflow version where the servlet action plugin was called, if any.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IPluginServletActionParams
getUser
-
Constructor Details
-
PluginServletActionParams
@Deprecated public PluginServletActionParams(Map<String, Serializable> httpSessionAttributes, Map<Serializable, Serializable> frqSessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, IUser user, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs, Mandant client, String sessionId) Deprecated.Usebuilder().Constructor for creating a parameters object with all necessary request data- Parameters:
httpSessionAttributes- attributes from the current HTTP sessionfrqSessionAttributes- Attributes from the current form request session, if any.valueParameter- request parameteruploadFiles- Files that were sent with the request. // * @param user the current logged-in user that sent the formlocale- the currently set localaction- an enumeration representing the HTTP method of the requestheaderMap- request header fieldsfs- theFrontendServerthat sent the requestclient- The client context, may benullfor a system plugin.sessionId- ID of the current session, may benullor empty when no session exists.
-
PluginServletActionParams
@Deprecated public PluginServletActionParams(Map<String, Serializable> httpSessionAttributes, Map<Serializable, Serializable> frqSessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, Benutzer user, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs, Mandant client, String sessionId) Deprecated.Constructor for creating a parameters object with all necessary request data- Parameters:
httpSessionAttributes- attributes from the current HTTP sessionfrqSessionAttributes- Attributes from the current form request session, if any.valueParameter- request parameteruploadFiles- Files that were sent with the request.user- the current logged-in user that sent the formlocale- the currently set localaction- an enumeration representing the HTTP method of the requestheaderMap- request header fieldsfs- theFrontendServerthat sent the requestclient- The client context, may benullfor a system plugin.sessionId- ID of the current session, may benullor empty when no session exists.
-
PluginServletActionParams
@Deprecated public PluginServletActionParams(SessionAttributes sessionAttributes, HashMap<String, List<String>> valueParameter, HashMap<String, List<FileData>> uploadFiles, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs) Deprecated.Constructor for creating a parameters object with all necessary request data- Parameters:
sessionAttributes- attributes from the current sessionvalueParameter- request parameteruploadFiles- Files that were sent with the request.locale- the currently set localaction- an enumeration representing the HTTP method of the requestheaderMap- request header fieldsfs- theFrontendServerthat sent the request
-
PluginServletActionParams
@Deprecated public PluginServletActionParams(Map<String, Serializable> sessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, Benutzer benutzer, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs, Mandant client, String sessionId) Deprecated.Constructor for creating a parameters object with all necessary request data- Parameters:
sessionAttributes- attributes from the current sessionvalueParameter- request parameteruploadFiles- Files that were sent with the request.benutzer- the current logged-in user that sent the formlocale- the currently set localaction- an enumeration representing the HTTP method of the requestheaderMap- request header fieldsfs- theFrontendServerthat sent the requestclient- The client context, may benullfor a system plugin.sessionId- ID of the current session, may benullor empty when no session exists.
-
PluginServletActionParams
@Deprecated public PluginServletActionParams(Map<String, Serializable> sessionAttributes, Map<String, List<String>> valueParameter, Map<String, List<FileData>> uploadFiles, Benutzer benutzer, Locale locale, EServletAction action, Map<String, String> headerMap, FrontendServer fs) Deprecated.- Parameters:
sessionAttributes- attributes from the current sessionvalueParameter- request parameteruploadFiles- files that are overhanded by the requestbenutzer- the current logged-in user that sent the formlocale- the currently set localaction- an enumeration representing the HTTP method of the requestheaderMap- request header fieldsfs- theFrontendServerthat sent the request
-
-
Method Details
-
getAction
- Specified by:
getActionin interfaceIPluginServletActionParams- Returns:
- The HTTP method of the servlet request.
-
getBackendUser
Description copied from interface:IPluginServletActionParamsGets theBACKENDuser that made the request to the plugin action servlet.- Specified by:
getBackendUserin interfaceIPluginServletActionParams- Returns:
- The form user, if any, or null otherwise.
-
getBaseUrl
Description copied from interface:IPluginServletActionParamsReturns 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.- Specified by:
getBaseUrlin interfaceIPluginServletActionParams- Returns:
- The HTTP request base URL.
- See Also:
-
getBenutzer
Deprecated.UseIPluginServletActionParams.getUser()instead.- Specified by:
getBenutzerin interfaceIPluginServletActionParams- Returns:
- The
Benutzerfrom the currentXfcSessionwho called the servlet action plugin.
-
getClientId
Description copied from interface:IPluginServletActionParamsGets the ID of the client scope where the servlet action plugin was called, if any.- Specified by:
getClientIdin interfaceIPluginServletActionParams- Returns:
- The client ID; or null if no client scope is available.
-
getContextPath
Description copied from interface:IPluginServletActionParamsReturns 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 byServletContext.getContextPath()should be considered as the prime or preferred context path of the application.- Specified by:
getContextPathin interfaceIPluginServletActionParams- Returns:
- a
Stringspecifying the portion of the request URI that indicates the context of the request - See Also:
-
getFormRecordId
Description copied from interface:IPluginServletActionParamsGets the ID of the form record scope where the servlet action plugin was called, if any.- Specified by:
getFormRecordIdin interfaceIPluginServletActionParams- Returns:
- The form record ID; or null if no form record scope is available.
-
getFormUser
Description copied from interface:IPluginServletActionParamsGets theFORMuser that made the request to the plugin action servlet. Requires thefrid(form request ID) parameter to be included in the request parameters.- Specified by:
getFormUserin interfaceIPluginServletActionParams- Returns:
- The form user, if any, or null otherwise.
-
getFormVersionId
- Specified by:
getFormVersionIdin interfaceIPluginServletActionParams
-
getFrontendServer
- Specified by:
getFrontendServerin interfaceIPluginServletActionParams- Returns:
- The current
FrontendServerto which the servlet request was made, ornullif the request was made directly to the master server.
-
getFrqSessionAttributes
Description copied from interface:IPluginServletActionParamsGets the values stored in the currentFRQSession. 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 theFRQSession. To modify the FRQ session attributes, use theIPluginServletActionRetVal.getFrqSessionAttributeMap()return value.- Specified by:
getFrqSessionAttributesin interfaceIPluginServletActionParams- Returns:
- Attributes from the form request session of the current request. If no such session exists, this is an empty map.
- See Also:
-
getFrqSessionId
Description copied from interface:IPluginServletActionParamsGets the ID of the current form request session, if such a session exists.- Specified by:
getFrqSessionIdin interfaceIPluginServletActionParams- Returns:
- The ID of the current FRQ (form request) session, if such a session exists.
- See Also:
-
getHeaderMap
- Specified by:
getHeaderMapin interfaceIPluginServletActionParams- Returns:
- A
Mapthat 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
- Specified by:
getLocalein interfaceIPluginServletActionParams- Returns:
- The current
Localeof the request; or the default locale in case no locale could be determined.
-
getPluginClient
- Specified by:
getPluginClientin interfaceIPluginServletActionParams- Returns:
- The
Mandantto which the servlet action plugin belongs to; ornullin case the plugin was installed as a system plugin and no client was provided in the servlet action URL.
-
getProjectId
Description copied from interface:IPluginServletActionParamsGets the ID of the project scope where the servlet action plugin was called, if any.- Specified by:
getProjectIdin interfaceIPluginServletActionParams- Returns:
- The project ID; or null if no project scope is available.
-
getRemoteAddr
Description copied from interface:IPluginServletActionParamsReturns the Internet Protocol (IP) address of the client that sent the request. This will first check theForwardedandX-Forwarded-Forrequest headers and if any is present, then return its first IP address, else just returnServletRequest.getRemoteAddr()unmodified.- Specified by:
getRemoteAddrin interfaceIPluginServletActionParams- Returns:
- The IP address of the client.
- See Also:
-
getRequestBodyInputStream
Description copied from interface:IPluginServletActionParamsGets 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, useIPluginServletActionParams.getRequestParameters()to access the text parameters andIPluginServletActionParams.getUploadFiles()to access the uploaded files.The caller is responsible to close the input stream after use.
- Specified by:
getRequestBodyInputStreamin interfaceIPluginServletActionParams- Returns:
- The
InputStreamof the HTTP request body.
-
getRequestParameters
Description copied from interface:IPluginServletActionParamsThe 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 asEServletAction.DELETE, you may have to parse the HTTP request body yourself.- Specified by:
getRequestParametersin interfaceIPluginServletActionParams- Returns:
- A
Mapwith the parameters from theHttpServletRequest. - See Also:
-
getRequestUri
Description copied from interface:IPluginServletActionParamsReturns 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 - Specified by:
getRequestUriin interfaceIPluginServletActionParams- Returns:
- a
Stringcontaining the part of the URL from the protocol name up to the query string - See Also:
-
getRequestUrl
Description copied from interface:IPluginServletActionParamsReconstructs 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.- Specified by:
getRequestUrlin interfaceIPluginServletActionParams- Returns:
- a
StringBufferobject containing the reconstructed URL - See Also:
-
getSessionAttributeMap
Deprecated.Description copied from interface:IPluginServletActionParamsGets the values from the currentHttpSession. 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 theHttpSession. To modify the session attributes, use theIPluginServletActionRetVal.getSessionAttributeMap()return value.- Specified by:
getSessionAttributeMapin interfaceIPluginServletActionParams- Returns:
- A map
Mapwith all attributes of the currentHttpSession.
-
getSessionAttributes
Deprecated.- Specified by:
getSessionAttributesin interfaceIPluginServletActionParams- Returns:
- All serializable session attributes.
-
getSessionID
- Specified by:
getSessionIDin interfaceIPluginServletActionParams- Returns:
- The session ID for the user who is currently logged in; or
nullin case no session ID is available (which may happen, for example, when the user is not logged in).
-
getUploadFiles
- Specified by:
getUploadFilesin interfaceIPluginServletActionParams- Returns:
- A
Mapbetween the name of an upload form element and the file(s) that were uploaded for that upload element.
-
getValueParameters
Deprecated.- Specified by:
getValueParametersin interfaceIPluginServletActionParams- Returns:
- All serializable session attributes.
-
getWorkflowVersionId
Description copied from interface:IPluginServletActionParamsGets the ID of the workflow version where the servlet action plugin was called, if any.- Specified by:
getWorkflowVersionIdin interfaceIPluginServletActionParams- Returns:
- The workflow version ID; or null if no workflow version scope is available.
-
builder
-
PluginServletActionParams(Map, Map, Map, Map, IUser, Locale, EServletAction, Map, FrontendServer, Mandant, String)