Interface IGroupDelegator

    • Method Detail

      • deleteUserGroup

        java.lang.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

        java.lang.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

        IUserGroup getUserGroup​(java.lang.String name)
                         throws ConnectionException,
                                RequestException,
                                AccessException
        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

        java.lang.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