org.labkey.remoteapi.study

## Class UpdateParticipantGroupCommand

- java.lang.Object
- - org.labkey.remoteapi.Command<ResponseType>
  - - org.labkey.remoteapi.PostCommand<UpdateParticipantGroupResponse>
    - - org.labkey.remoteapi.study.UpdateParticipantGroupCommand

-     public class UpdateParticipantGroupCommand
      extends PostCommand<UpdateParticipantGroupResponse>

  Request to be sent to the server to update an existing participant group User: jeckels Date: 12/11/13

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `UpdateParticipantGroupCommand.UpdatedParticipantGroup` Special subclass that allows specifying just participants that should be added or removed, without needing to specify the full set of participants.

    - ### 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
    Constructor and Description
    `UpdateParticipantGroupCommand(ParticipantGroup group)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected UpdateParticipantGroupResponse` | `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, the HTTP status code, and parsed JSONObject.
    `org.json.simple.JSONObject` | `getJsonObject()` Returns the JSON object to post, or null if the JSON object has not yet been set.

    - ### Methods inherited from class org.labkey.remoteapi.PostCommand

      `copy, createRequest, setJsonObject`

    - ### Methods inherited from class org.labkey.remoteapi.Command

      `_execute, execute, getActionName, getActionUrl, getControllerName, getHttpRequest, 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

    - #### UpdateParticipantGroupCommand

          public UpdateParticipantGroupCommand(ParticipantGroup group)

      Parameters:
        `group` - the group, including its requested updates. If fields are not set, they will not be changed from their existing values in the current saved group.

  - ### Method Detail

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

    - #### createResponse

          protected UpdateParticipantGroupResponse 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, the HTTP status code, and parsed JSONObject.

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

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