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

public class UsersDelegator extends BaseDelegator implements IUsersDelegator
Implementation to handle the Users command.
  • Constructor Details

    • UsersDelegator

      public UsersDelegator(IOptionsServer server)
      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: IUsersDelegator
      Get 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:
      getUsers in interface IUsersDelegator
      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: IUsersDelegator
      Get 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:
      getUsers in interface IUsersDelegator
      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 request
      AccessException - if the Perforce server denies access to the caller