org.labkey.remoteapi.security
Class CreateGroupCommand

java.lang.Object
  extended by org.labkey.remoteapi.Command<ResponseType>
      extended by org.labkey.remoteapi.PostCommand<CreateGroupResponse>
          extended by org.labkey.remoteapi.security.CreateGroupCommand

public class CreateGroupCommand
extends PostCommand<CreateGroupResponse>

Creates a new user group. When executed in a project or subfolder, it will create the group at the project level. When executed at the root level, it will create a new site group.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.labkey.remoteapi.Command
Command.CommonParameters
 
Field Summary
 
Fields inherited from class org.labkey.remoteapi.Command
CONTENT_TYPE_JSON
 
Constructor Summary
CreateGroupCommand(CreateGroupCommand source)
           
CreateGroupCommand(java.lang.String name)
           
 
Method Summary
 PostCommand copy()
          Returns a copy of this object.
protected  CreateGroupResponse createResponse(java.lang.String text, int status, java.lang.String contentType, org.json.simple.JSONObject json)
          Creates an instance of the response class, initialized with the response text and the HTTP status code.
 org.json.simple.JSONObject getJsonObject()
          Returns the JSON object to post, or null if the JSON object has not yet been set.
 java.lang.String getName()
           
 void setName(java.lang.String name)
           
 
Methods inherited from class org.labkey.remoteapi.PostCommand
createMethod, setJsonObject
 
Methods inherited from class org.labkey.remoteapi.Command
execute, getActionName, getActionUrl, getControllerName, getHttpMethod, getParameters, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateGroupCommand

public CreateGroupCommand(java.lang.String name)

CreateGroupCommand

public CreateGroupCommand(CreateGroupCommand source)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

createResponse

protected CreateGroupResponse createResponse(java.lang.String text,
                                             int status,
                                             java.lang.String contentType,
                                             org.json.simple.JSONObject json)
Description copied from class: Command
Creates an instance of the response class, initialized with the response text and the HTTP status code.

Override this method to create an instance of a different class that extends CommandResponse

Overrides:
createResponse in class Command<CreateGroupResponse>
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.

copy

public PostCommand copy()
Description copied from class: Command
Returns a copy of this object. Derived classes should override this to copy their own data members

Overrides:
copy in class PostCommand<CreateGroupResponse>
Returns:
A copy of this object

getJsonObject

public org.json.simple.JSONObject getJsonObject()
Description copied from class: PostCommand
Returns the JSON object to post, or null if the JSON object has not yet been set. Override this method to provide the JSON object dynamically.

Overrides:
getJsonObject in class PostCommand<CreateGroupResponse>
Returns:
The JSON object to post.