Package org.labkey.remoteapi
Class SimplePostCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
- All Implemented Interfaces:
HasRequiredVersion
-
Nested Class Summary
Nested classes/interfaces inherited from class org.labkey.remoteapi.Command
Command.CommonParameters, Command.Response
-
Field Summary
Fields inherited from class org.labkey.remoteapi.Command
CONTENT_TYPE_JSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new, mutable parameter map initialized with the values from the map passed tosetParameters(Map)
method, if any.org.json.JSONObject
Returns the JSON object to post or null for no JSON.void
setJsonObject
(org.json.JSONObject jsonObject) Sets the JSON object to post.void
setParameters
(Map<String, Object> parameters) Sets the URL parameter map.Methods inherited from class org.labkey.remoteapi.PostCommand
createRequest
Methods inherited from class org.labkey.remoteapi.Command
_execute, createResponse, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Constructor Details
-
SimplePostCommand
-
-
Method Details
-
getJsonObject
public org.json.JSONObject getJsonObject()Returns the JSON object to post or null for no JSON.- Overrides:
getJsonObject
in classPostCommand<CommandResponse>
- Returns:
- The JSON object to post.
-
setJsonObject
public void setJsonObject(org.json.JSONObject jsonObject) Sets the JSON object to post.- Parameters:
jsonObject
- The JSON object to post
-
createParameterMap
Returns a new, mutable parameter map initialized with the values from the map passed tosetParameters(Map)
method, if any.- Overrides:
createParameterMap
in classCommand<CommandResponse,
org.apache.hc.client5.http.classic.methods.HttpPost> - Returns:
- The parameter map to use when building the URL.
-
setParameters
Sets the URL parameter map.- Parameters:
parameters
- The values to use when initializing the parameter map
-