Interface IGroupDelegator

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

public interface IGroupDelegator
Define the supported p4 groups commands in p4java.
  • Method Details

    • deleteUserGroup

      String deleteUserGroup(IUserGroup group, UpdateUserGroupOptions opts) throws P4JavaException
      Delete a Perforce user group from the Perforce server.
      Parameters:
      group - non-null group to be deleted.
      opts - which delete options to be applied
      Returns:
      possibly-null status message string as returned from the server
      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.
      P4JavaException
    • createUserGroup

      String createUserGroup(IUserGroup group, UpdateUserGroupOptions opts) throws P4JavaException
      Create a new Perforce user group on the Perforce server.
      Parameters:
      group - non-null IUserGroup to be created.
      opts - which create options to be applied
      Returns:
      possibly-null status message string as returned from the server
      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.
      P4JavaException
    • getUserGroup

      Get the named Perforce user group. Note that since the Perforce server usually interprets asking for a non-existent group as equivalent to asking for a template for a new user group, you will normally always get back a result here. It is best to first use the getUserGroups method to see if the group exists, then use this method to retrieve a specific group once you know it exists. TODO: once we have finished the delegators, IOptionServer should be made to extend IServer this definition can then be removed as there is no Options object for getUserGroup
      Parameters:
      name - non-null group name.
      Returns:
      IUserGroup representing the named user group if it exists on the server; null otherwise (but see note in main comments above).
      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.
    • updateUserGroup

      String updateUserGroup(IUserGroup group, UpdateUserGroupOptions opts) throws P4JavaException
      Update a Perforce user group on the Perforce server.
      Parameters:
      group - non-null user group to be updated.
      opts - which update options to be applied
      Returns:
      possibly-null status message string as returned from the server
      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.
      P4JavaException