Class ProcessBasedRouterPayload
java.lang.Object
com.kingsrook.qqq.backend.core.model.actions.processes.QProcessPayload
com.kingsrook.qqq.middleware.javalin.routeproviders.ProcessBasedRouterPayload
process payload shared the processes which are used as process-based-router
processes. e.g., the fields here are those written to and read by
ProcessBasedRouter.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorProcessBasedRouterPayload(ProcessState processState) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGetter for bodyStringGetter for cookiesgetFormParam(String name) Get a single form parameter value by name.Getter for formParamsGetter for methodgetPath()Getter for pathGetter for pathParamsgetQueryParam(String name) Get a single query parameter value by name.Getter for queryParamsGetter for redirectURLbyte[]Getter for responseBytesGetter for responseHeadersGetter for responseStringGetter for statusCodevoidsetBodyString(String bodyString) Setter for bodyStringvoidsetCookies(Map<String, String> cookies) Setter for cookiesvoidsetFormParams(Map<String, List<String>> formParams) Setter for formParamsvoidSetter for methodvoidSetter for pathvoidsetPathParams(Map<String, String> pathParams) Setter for pathParamsvoidsetQueryParams(Map<String, List<String>> queryParams) Setter for queryParamsvoidsetRedirectURL(String redirectURL) Setter for redirectURLvoidsetResponseBytes(byte[] responseBytes) Setter for responseBytesvoidsetResponseHeaders(Map<String, String> responseHeaders) Setter for responseHeadersvoidsetResponseString(String responseString) Setter for responseStringvoidsetStatusCode(Integer statusCode) Setter for statusCodewithBodyString(String bodyString) Fluent setter for bodyStringwithCookies(Map<String, String> cookies) Fluent setter for cookieswithFormParams(Map<String, List<String>> formParams) Fluent setter for formParamswithMethod(String method) Fluent setter for methodFluent setter for pathwithPathParams(Map<String, String> pathParams) Fluent setter for pathParamswithQueryParams(Map<String, List<String>> queryParams) Fluent setter for queryParamswithRedirectURL(String redirectURL) Fluent setter for redirectURLwithResponseBytes(byte[] responseBytes) Fluent setter for responseByteswithResponseHeaders(Map<String, String> responseHeaders) Fluent setter for responseHeaderswithResponseString(String responseString) Fluent setter for responseStringwithStatusCode(Integer statusCode) Fluent setter for statusCodeMethods inherited from class com.kingsrook.qqq.backend.core.model.actions.processes.QProcessPayload
allowedFieldTypes, fromProcessState, getFieldList, populateFromProcessState, toProcessState
-
Constructor Details
-
ProcessBasedRouterPayload
public ProcessBasedRouterPayload()Constructor -
ProcessBasedRouterPayload
Constructor
-
-
Method Details
-
getFormParam
Get a single form parameter value by name. Convenience method for the common use-case of retrieving a single value from form parameters, rather than dealing with the List of values that the formal HTTP interface provides.- Parameters:
name- the form parameter name- Returns:
- the first value for the parameter, or null if not present
-
getQueryParam
Get a single query parameter value by name. Convenience method for the common use-case of retrieving a single value from query parameters, rather than dealing with the List of values that the formal HTTP interface provides.- Parameters:
name- the query parameter name- Returns:
- the first value for the parameter, or null if not present
-
getPath
-
setPath
-
withPath
Fluent setter for path- Parameters:
path- the HTTP request path- Returns:
- this
-
getMethod
-
setMethod
-
withMethod
Fluent setter for method- Parameters:
method- the HTTP method (GET, POST, etc.)- Returns:
- this
-
getPathParams
-
setPathParams
-
withPathParams
Fluent setter for pathParams- Parameters:
pathParams- map of path parameters extracted from the URL pattern- Returns:
- this
-
getCookies
-
setCookies
-
withCookies
Fluent setter for cookies- Parameters:
cookies- map of HTTP cookies from the request- Returns:
- this
-
getStatusCode
-
setStatusCode
-
withStatusCode
Fluent setter for statusCode- Parameters:
statusCode- HTTP status code for the response (e.g., 200, 404, 500)- Returns:
- this
-
getResponseHeaders
-
setResponseHeaders
-
withResponseHeaders
Fluent setter for responseHeaders- Parameters:
responseHeaders- map of HTTP headers to include in the response- Returns:
- this
-
getResponseString
-
setResponseString
-
withResponseString
Fluent setter for responseString- Parameters:
responseString- string content to send in the HTTP response body- Returns:
- this
-
getResponseBytes
public byte[] getResponseBytes()Getter for responseBytes- See Also:
-
setResponseBytes
public void setResponseBytes(byte[] responseBytes) Setter for responseBytes- See Also:
-
withResponseBytes
Fluent setter for responseBytes- Parameters:
responseBytes- binary content to send in the HTTP response body- Returns:
- this
-
getRedirectURL
-
setRedirectURL
-
withRedirectURL
Fluent setter for redirectURL- Parameters:
redirectURL- URL to redirect the client to instead of sending a body- Returns:
- this
-
getQueryParams
-
setQueryParams
-
withQueryParams
Fluent setter for queryParams- Parameters:
queryParams- map of query parameters from the URL- Returns:
- this
-
getFormParams
-
setFormParams
-
withFormParams
Fluent setter for formParams- Parameters:
formParams- map of form parameters from POST request body- Returns:
- this
-
getBodyString
-
setBodyString
-
withBodyString
Fluent setter for bodyString- Parameters:
bodyString- raw request body content as a string- Returns:
- this
-