Interface IClientDelegator

All Known Subinterfaces:
IOptionsServer, IServer, IStreamingServer
All Known Implementing Classes:
ClientDelegator, NtsServerImpl, OneShotServerImpl, RpcServer, Server

public interface IClientDelegator
  • Method Details

    • getClient

      Throws:
      ConnectionException
      RequestException
      AccessException
    • getClient

      IClient getClient(@Nonnull IClientSummary clientSummary) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • getClientTemplate

      IClient getClientTemplate(String clientName) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • getClientTemplate

      IClient getClientTemplate(String clientName, boolean allowExistent) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • getClientTemplate

      IClient getClientTemplate(String clientName, GetClientTemplateOptions getClientTemplateOptions) throws P4JavaException
      Get a template of a non-existent named Perforce client. This will only return an IClient for clients that don't exist unless the allowExistent parameter is set to true. This method is designed to be able to get the server returned default values it uses when a non-existent client is requested.
      Parameters:
      clientName - Not blank Perforce client name.
      getClientTemplateOptions - GetClientTemplateOptions object describing optional parameters; if null, no options are set.
      Returns:
      IClient representing the specified Perforce client template, or null if no such client template.
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
    • createClient

      String createClient(@Nonnull IClient newClient) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • createTempClient

      void createTempClient(@Nonnull IClient newClient) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • updateClient

      String updateClient(@Nonnull IClient client) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • updateClient

      String updateClient(IClient client, boolean force) throws ConnectionException, RequestException, AccessException
      Update an existing Perforce client on the current Perforce server. This client does not need to be the current client, and no association with the passed-in client is made by the server (i.e. it's not made the current client).
      Parameters:
      client - non-null IClient defining the Perforce client to be updated
      force - if true, tell the server to attempt to force the update regardless of the consequences. You're on your own with this one...
      Returns:
      possibly-null operation result message string from the Perforce server
      Throws:
      RequestException - if any error occurs in the processing of this method.
      ConnectionException - on error
      AccessException - on error
      Since:
      2011.2
    • updateClient

      String updateClient(IClient client, UpdateClientOptions opts) throws P4JavaException
      Update an existing Perforce client on the current Perforce server. This client does not need to be the current client, and no association with the passed-in client is made by the server (i.e. it's not made the current client).
      Parameters:
      client - non-null IClient defining the Perforce client to be updated
      opts - UpdateClientOptions object describing optional parameters; if null, no options are set.
      Returns:
      possibly-null operation result message string from the Perforce server
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
      Since:
      2011.2
    • deleteClient

      String deleteClient(String clientName, boolean force) throws ConnectionException, RequestException, AccessException
      Throws:
      ConnectionException
      RequestException
      AccessException
    • deleteClient

      String deleteClient(String clientName, DeleteClientOptions opts) throws P4JavaException
      Delete a Perforce client from a Perforce server. The effects this has on the client and the server are not well-defined here, and you should probably consult the relevant Perforce documentation for your specific case. In any event, you can cause quite a lot of inconvenience (and maybe even damage) doing a forced delete without preparing properly for it, especially if the client is the server object's current client.
      Parameters:
      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.
      Returns:
      possibly-null operation result message string from the Perforce server.
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
    • switchClientView

      String switchClientView(String templateClientName, String targetClientName, SwitchClientViewOptions opts) throws P4JavaException
      Switch the target client spec's view without invoking the editor. With -t to switch to a view defined in another client spec. Switching views is not allowed in a client that has opened files. The -f flag can be used with -s to force switching with opened files. View switching has no effect on files in a client workspace until 'p4 sync' is run.
      Parameters:
      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.
      Returns:
      possibly-null operation result message string from the Perforce server
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
      Since:
      2011.2
    • switchStreamView

      String switchStreamView(String streamPath, String targetClientName, SwitchClientViewOptions opts) throws P4JavaException
      Switch the target client spec's view without invoking the editor. With -S to switch to the specified stream's view. Switching views is not allowed in a client that has opened files. The -f flag can be used with -s to force switching with opened files. View switching has no effect on files in a client workspace until 'p4 sync' is run.
      Parameters:
      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.
      Returns:
      possibly-null operation result message string from the Perforce server
      Throws:
      P4JavaException - if any error occurs in the processing of this method.
      Since:
      2011.2