Class ClientsDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.ClientsDelegator
-
- All Implemented Interfaces:
IClientsDelegator
public class ClientsDelegator extends BaseDelegator implements IClientsDelegator
- Since:
- 15/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 ClientsDelegator(IOptionsServer server)
Instantiate a new ClientsDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IClientSummary>
getClients(GetClientsOptions opts)
Get a list of IClientSummary objects for all Perforce clients known to this Perforce server.java.util.List<IClientSummary>
getClients(java.lang.String userName, java.lang.String nameFilter, int maxResults)
Get a list of IClientSummary objects for all Perforce clients known to this Perforce server.
-
-
-
Constructor Detail
-
ClientsDelegator
public ClientsDelegator(IOptionsServer server)
Instantiate a new ClientsDelegator, 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 Detail
-
getClients
public java.util.List<IClientSummary> getClients(GetClientsOptions opts) throws P4JavaException
Description copied from interface:IClientsDelegator
Get a list of IClientSummary objects for all Perforce clients known to this Perforce server.Note that this method returns light-weight IClientSummary objects rather than full IClient objects; if you need the heavy-weight IClient objects, you should use getClient().
Note also that the returned IClient objects are not "complete", in the sense that implementations are free to leave certain attributes null for performance reasons. In general, at least the client's name, root, description, last modification time are guaranteed correct.
- Specified by:
getClients
in interfaceIClientsDelegator
- Parameters:
opts
- GetClientsOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null (but possibly empty) list of Client objects for Perforce clients known to this Perforce server.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
getClients
public java.util.List<IClientSummary> getClients(java.lang.String userName, java.lang.String nameFilter, int maxResults) throws ConnectionException, RequestException, AccessException
Description copied from interface:IClientsDelegator
Get a list of IClientSummary objects for all Perforce clients known to this Perforce server.Note that this method returns light-weight IClientSummary objects rather than full IClient objects; if you need the heavy-weight IClient objects, you should use getClient().
Note also that the returned IClient objects are not "complete", in the sense that implementations are free to leave certain attributes null for performance reasons. In general, at least the client's name, root, description, last modification time are guaranteed correct.
- Specified by:
getClients
in interfaceIClientsDelegator
- Parameters:
userName
- user namenameFilter
- limits output to clients whose name matches the nameFilter pattern. Corresponds to -enameFilter flagmaxResults
- If greater than zero, limit output to the first maxResults number of clients.- Returns:
- non-null (but possibly empty) list of Client objects for Perforce clients known to
- Throws:
ConnectionException
- on errorRequestException
- on errorAccessException
- on error
-
-