org.labkey.remoteapi.security
Class RenameGroupCommand

java.lang.Object
  extended by org.labkey.remoteapi.Command<ResponseType>
      extended by org.labkey.remoteapi.PostCommand<RenameGroupResponse>
          extended by org.labkey.remoteapi.security.RenameGroupCommand

public class RenameGroupCommand
extends PostCommand<RenameGroupResponse>

Renames an existing 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
RenameGroupCommand(int groupId, java.lang.String newName)
           
RenameGroupCommand(RenameGroupCommand source)
           
 
Method Summary
 PostCommand copy()
          Returns a copy of this object.
protected  RenameGroupResponse 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.
 int getGroupId()
           
 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 getNewName()
           
 void setGroupId(int groupId)
           
 void setNewName(java.lang.String newName)
           
 
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

RenameGroupCommand

public RenameGroupCommand(int groupId,
                          java.lang.String newName)

RenameGroupCommand

public RenameGroupCommand(RenameGroupCommand source)
Method Detail

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<RenameGroupResponse>
Returns:
A copy of this object

getGroupId

public int getGroupId()

setGroupId

public void setGroupId(int groupId)

getNewName

public java.lang.String getNewName()

setNewName

public void setNewName(java.lang.String newName)

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<RenameGroupResponse>
Returns:
The JSON object to post.

createResponse

protected RenameGroupResponse 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<RenameGroupResponse>
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.