Package org.labkey.remoteapi.security
Class CreateContainerCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
org.labkey.remoteapi.PostCommand<CreateContainerResponse>
org.labkey.remoteapi.security.CreateContainerCommand
- All Implemented Interfaces:
HasRequiredVersion
Create a container (project/folder/workbook) on the server
-
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 TypeMethodDescriptionprotected CreateContainerResponsecreateResponse(String text, int status, String contentType, org.json.JSONObject json) Creates an instance of the response class, initialized with the response text, the HTTP status code, and parsed JSONObject.org.json.JSONObjectReturns the JSON object to post or null for no JSON.getName()getTitle()getType()booleanvoidsetDescription(String description) voidsetFolderType(String folderType) voidvoidvoidvoidsetWorkbook(boolean workbook) Methods inherited from class org.labkey.remoteapi.PostCommand
createRequestMethods inherited from class org.labkey.remoteapi.Command
_execute, createParameterMap, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Constructor Details
-
CreateContainerCommand
- Parameters:
name- the name of the container to create
-
-
Method Details
-
getJsonObject
public org.json.JSONObject getJsonObject()Description copied from class:PostCommandReturns the JSON object to post or null for no JSON. Override this method to provide parameters as JSON.- Overrides:
getJsonObjectin classPostCommand<CreateContainerResponse>- Returns:
- The JSON object to post.
-
getName
-
setName
-
getType
-
setType
-
getTitle
-
setTitle
-
getDescription
-
setDescription
-
isWorkbook
public boolean isWorkbook() -
setWorkbook
public void setWorkbook(boolean workbook) -
getFolderType
-
setFolderType
-
createResponse
protected CreateContainerResponse createResponse(String text, int status, String contentType, org.json.JSONObject json) Description copied from class:CommandCreates an instance of the response class, initialized with the response text, the HTTP status code, and parsed JSONObject.Override this method to create an instance of a different class that extends CommandResponse
- Overrides:
createResponsein classCommand<CreateContainerResponse,org.apache.hc.client5.http.classic.methods.HttpPost> - Parameters:
text- The response text from the server.status- The HTTP status code.contentType- The Content-Type header value.json- The parsed JSONObject (or null if no JSON was returned).- Returns:
- An instance of the response object.
-