org.labkey.remoteapi.security

## Class GroupMembersCommand

- java.lang.Object
- - org.labkey.remoteapi.Command<ResponseType>
  - - org.labkey.remoteapi.PostCommand<CommandResponse>
    - - org.labkey.remoteapi.security.GroupMembersCommand

- Direct Known Subclasses:
    AddGroupMembersCommand, RemoveGroupMembersCommand

      public abstract class GroupMembersCommand
      extends PostCommand<CommandResponse>

  Base class for AddGroupMembersCommand and RemoveGroupMembersCommand

- - ### 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
    Modifier | Constructor and Description
    --- | ---
    `protected` | `GroupMembersCommand(GroupMembersCommand source)`
    `protected` | `GroupMembersCommand(java.lang.String actionName, int groupId)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPrincipalId(int... ids)`
    `void` | `addPrincipalId(java.util.List<java.lang.Integer> ids)`
    `void` | `clearPrincipalIds()`
    `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.util.List<java.lang.Integer>` | `getPrincipals()`
    `void` | `setGroupId(int groupId)`

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

      `copy, createRequest, setJsonObject`

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

      `_execute, createResponse, 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

    - #### GroupMembersCommand

          protected GroupMembersCommand(java.lang.String actionName,
                                        int groupId)

    - #### GroupMembersCommand

          protected GroupMembersCommand(GroupMembersCommand source)

  - ### Method Detail

    - #### getPrincipals

          public java.util.List<java.lang.Integer> getPrincipals()

    - #### addPrincipalId

          public void addPrincipalId(int... ids)

    - #### addPrincipalId

          public void addPrincipalId(java.util.List<java.lang.Integer> ids)

    - #### clearPrincipalIds

          public void clearPrincipalIds()

    - #### getGroupId

          public int getGroupId()

    - #### setGroupId

          public void setGroupId(int groupId)

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