Class UsersDelegator
java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.UsersDelegator
- All Implemented Interfaces:
IUsersDelegator
Implementation to handle the Users command.
-
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
ConstructorsConstructorDescriptionUsersDelegator(IOptionsServer server) Instantiate a new UsersDelegator, providing the server object that will be used to execute Perforce Helix attribute commands. -
Method Summary
Modifier and TypeMethodDescriptionGet a list of Perforce users known to this Perforce server.getUsers(List<String> userList, GetUsersOptions opts) Get a list of Perforce users known to this Perforce server.
-
Constructor Details
-
UsersDelegator
Instantiate a new UsersDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server- a concrete implementation of a Perforce Helix Server
-
-
Method Details
-
getUsers
public List<IUserSummary> getUsers(List<String> userList, GetUsersOptions opts) throws P4JavaException Description copied from interface:IUsersDelegatorGet a list of Perforce users known to this Perforce server. Note that maxUsers and the user list are supposed to be mutually exclusive in usage, but this is not enforced by P4Java as the restriction doesn't make much sense and may be lifted in the Perforce server later.Note that this implementation differs a bit from the p4 command line version in that it simply doesn't return any output for unmatched users.
- Specified by:
getUsersin interfaceIUsersDelegator- Parameters:
userList- if non-null, restrict output to users matching the passed-in list of users.opts- GetUsersOptions object describing optional parameters; if null, no options are set- Returns:
- non-null (but possibly empty) list of non-null IUserSummary objects representing the underlying Perforce users (if any).
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
getUsers
public List<IUserSummary> getUsers(List<String> userList, int maxUsers) throws ConnectionException, RequestException, AccessException Description copied from interface:IUsersDelegatorGet a list of Perforce users known to this Perforce server. Note that maxUsers and the user list are supposed to be mutually exclusive in usage, but this is not enforced by P4Java as the restriction doesn't make much sense and may be lifted in the Perforce server later.Note that this implementation differs a bit from the p4 command line version in that it simply doesn't return any output for unmatched users.
- Specified by:
getUsersin interfaceIUsersDelegator- Parameters:
userList- if non-null, restrict output to users matching the passed-in list of users.maxUsers- if positive, only return the first maxUsers users.- Returns:
- non-null (but possibly empty) list of non-null IUserSummary objects representing the underlying Perforce users (if any).
- Throws:
ConnectionException- if the Perforce server is unreachable or is not connected.RequestException- if the Perforce server encounters an error during its processing of the requestAccessException- if the Perforce server denies access to the caller
-