public class ClientDelegator extends BaseDelegator implements IClientDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
ClientDelegator(IOptionsServer server) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createClient(IClient newClient) |
void |
createTempClient(IClient newClient) |
java.lang.String |
deleteClient(java.lang.String clientName,
boolean force) |
java.lang.String |
deleteClient(java.lang.String clientName,
DeleteClientOptions opts)
Delete a Perforce client from a Perforce server.
|
IClient |
getClient(IClientSummary clientSummary) |
IClient |
getClient(java.lang.String clientName) |
IClient |
getClientTemplate(java.lang.String clientName) |
IClient |
getClientTemplate(java.lang.String clientName,
boolean allowExistent) |
IClient |
getClientTemplate(java.lang.String clientName,
GetClientTemplateOptions getClientTemplateOptions)
Get a template of a non-existent named Perforce client.
|
java.lang.String |
switchClientView(java.lang.String templateClientName,
java.lang.String targetClientName,
SwitchClientViewOptions opts)
Switch the target client spec's view without invoking the editor.
|
java.lang.String |
switchStreamView(java.lang.String streamPath,
java.lang.String targetClientName,
SwitchClientViewOptions opts)
Switch the target client spec's view without invoking the editor.
|
java.lang.String |
updateClient(IClient client) |
java.lang.String |
updateClient(IClient client,
boolean force)
Update an existing Perforce client on the current Perforce server.
|
java.lang.String |
updateClient(IClient client,
UpdateClientOptions opts)
Update an existing Perforce client on the current Perforce server.
|
public ClientDelegator(IOptionsServer server)
public IClient getClient(java.lang.String clientName) throws ConnectionException, RequestException, AccessException
getClient
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public IClient getClient(@Nonnull IClientSummary clientSummary) throws ConnectionException, RequestException, AccessException
getClient
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public IClient getClientTemplate(java.lang.String clientName) throws ConnectionException, RequestException, AccessException
getClientTemplate
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public IClient getClientTemplate(java.lang.String clientName, boolean allowExistent) throws ConnectionException, RequestException, AccessException
getClientTemplate
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public IClient getClientTemplate(@Nonnull java.lang.String clientName, GetClientTemplateOptions getClientTemplateOptions) throws P4JavaException
getClientTemplate
in interface IClientDelegator
clientName
- Not blank Perforce client name.getClientTemplateOptions
- GetClientTemplateOptions object describing optional
parameters; if null, no options are set.P4JavaException
- if any error occurs in the processing of this method.public java.lang.String createClient(@Nonnull IClient newClient) throws ConnectionException, RequestException, AccessException
createClient
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public void createTempClient(@Nonnull IClient newClient) throws ConnectionException, AccessException, RequestException
createTempClient
in interface IClientDelegator
ConnectionException
AccessException
RequestException
public java.lang.String updateClient(@Nonnull IClient client) throws ConnectionException, RequestException, AccessException
updateClient
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public java.lang.String updateClient(@Nonnull IClient client, boolean force) throws ConnectionException, RequestException, AccessException
updateClient
in interface IClientDelegator
client
- non-null IClient defining the Perforce client to be updatedforce
- if true, tell the server to attempt to force the update regardless of the
consequences. You're on your own with this one...ConnectionException
- on errorRequestException
- if any error occurs in the processing of this method.AccessException
- on errorpublic java.lang.String updateClient(@Nonnull IClient client, UpdateClientOptions opts) throws P4JavaException
updateClient
in interface IClientDelegator
client
- non-null IClient defining the Perforce client to be updatedopts
- UpdateClientOptions object describing optional parameters; if null, no options
are set.P4JavaException
- if any error occurs in the processing of this method.public java.lang.String deleteClient(java.lang.String clientName, boolean force) throws ConnectionException, RequestException, AccessException
deleteClient
in interface IClientDelegator
ConnectionException
RequestException
AccessException
public java.lang.String deleteClient(java.lang.String clientName, DeleteClientOptions opts) throws P4JavaException
deleteClient
in interface IClientDelegator
clientName
- non-null name of the client to be deleted from the server.opts
- DeleteClientOptions object describing optional parameters; if null, no
options are set.P4JavaException
- if any error occurs in the processing of this method.public java.lang.String switchClientView(java.lang.String templateClientName, java.lang.String targetClientName, SwitchClientViewOptions opts) throws P4JavaException
switchClientView
in interface IClientDelegator
templateClientName
- non-null name of the template client who's view will be used for
the target (or current) client to switched to.targetClientName
- possibly-null name of the target client whose view will be changed
to the template client's view. If null, the current client will be
used.opts
- SwitchClientViewOptions object describing optional parameters; if
null, no options are set.P4JavaException
- if any error occurs in the processing of this method.public java.lang.String switchStreamView(java.lang.String streamPath, java.lang.String targetClientName, SwitchClientViewOptions opts) throws P4JavaException
switchStreamView
in interface IClientDelegator
streamPath
- non-null stream's path in a stream depot, of the form
//depotname/streamname who's view will be used for the target (or
current) client to switched to.targetClientName
- possibly-null name of the target client whose view will be changed to
the stream's view. If null, the current client will be used.opts
- SwitchClientViewOptions object describing optional parameters; if
null, no options are set.P4JavaException
- if any error occurs in the processing of this method.