Class GroupsDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.GroupsDelegator
-
- All Implemented Interfaces:
IGroupsDelegator
public class GroupsDelegator extends BaseDelegator implements IGroupsDelegator
- Since:
- 12/09/2016
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description GroupsDelegator(IOptionsServer server)
Instantiate a new GroupsDelegator for the given server implemention.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
GroupsDelegator
public GroupsDelegator(IOptionsServer server)
Instantiate a new GroupsDelegator for the given server implemention.- Parameters:
server
- the server to delegate for
-
-
Method Detail
-
getUserGroups
public java.util.List<IUserGroup> getUserGroups(java.lang.String userOrGroupName, GetUserGroupsOptions opts) throws P4JavaException
Description copied from interface:IGroupsDelegator
Get a list of Perforce user groups from the server.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.
- Specified by:
getUserGroups
in interfaceIGroupsDelegator
- Parameters:
userOrGroupName
- if non-null, restrict the list to the specified group or username.opts
- GetUserGroupsOptions object describing optional parameters; if null, no options are set- Returns:
- a non-null but possibly-empty list of qualifying groups.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
getUserGroups
public java.util.List<IUserGroup> getUserGroups(java.lang.String userOrGroupName, boolean indirect, boolean displayValues, int maxGroups) throws ConnectionException, RequestException, AccessException
Implemented on behalf of legacy clients.- Parameters:
userOrGroupName
- userOrGroupNameindirect
- indirectdisplayValues
- displayValuesmaxGroups
- maxGroups- Returns:
- list of groups
- Throws:
ConnectionException
- on errorRequestException
- on errorAccessException
- on error- See Also:
IServer.getUserGroups(String, boolean, boolean, int)
-
-