public class GroupsDelegator extends BaseDelegator implements IGroupsDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
GroupsDelegator(IOptionsServer server)
Instantiate a new GroupsDelegator for the given server implemention.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<IUserGroup> |
getUserGroups(java.lang.String userOrGroupName,
boolean indirect,
boolean displayValues,
int maxGroups)
Implemented on behalf of legacy clients.
|
java.util.List<IUserGroup> |
getUserGroups(java.lang.String userOrGroupName,
GetUserGroupsOptions opts)
Get a list of Perforce user groups from the server.
|
public GroupsDelegator(IOptionsServer server)
server
- the server to delegate forpublic java.util.List<IUserGroup> getUserGroups(java.lang.String userOrGroupName, GetUserGroupsOptions opts) throws P4JavaException
IGroupsDelegator
Note that the Perforce server considers it an error to have both indirect and displayValues parameters set true; this will cause the server to throw a RequestException with an appropriate usage message.
getUserGroups
in interface IGroupsDelegator
userOrGroupName
- if non-null, restrict the list to the specified group or
username.opts
- GetUserGroupsOptions object describing optional parameters; if
null, no options are setP4JavaException
- if any error occurs in the processing of this method.public java.util.List<IUserGroup> getUserGroups(java.lang.String userOrGroupName, boolean indirect, boolean displayValues, int maxGroups) throws ConnectionException, RequestException, AccessException
userOrGroupName
- userOrGroupNameindirect
- indirectdisplayValues
- displayValuesmaxGroups
- maxGroupsConnectionException
- on errorRequestException
- on errorAccessException
- on errorIServer.getUserGroups(String, boolean, boolean, int)