Interface IRenameUserDelegator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String renameUser​(java.lang.String oldUserName, java.lang.String newUserName)
      Completely renames a user, modifying all database records which mention the user.
    • Method Detail

      • renameUser

        java.lang.String renameUser​(java.lang.String oldUserName,
                                    java.lang.String newUserName)
                             throws P4JavaException
        Completely renames a user, modifying all database records which mention the user.

        This includes all workspaces, labels, branches, streams, etc. which are owned by the user, all pending, shelved, and committed changes created by the user, any files that the user has opened or shelved, any fixes that the user made to jobs, any properties that apply to the user, any groups that the user is in, and the user record itself.

        The username is not changed in descriptive text fields (such as job descriptions, change descriptions, or workspace descriptions), only where it appears as the owner or user field of the database record.

        Protection table entries that apply to the user are updated only if the Name: field exactly matches the user name; if the Name: field contains wildcards, it is not modified.

        The only job field that is processed is attribute code 103. If you have included the username in other job fields they will have to be processed separately.

        The full semantics of this operation are found in the main 'p4 help' documentation.

        This method requires 'super' access granted by 'p4 protect'.

        Parameters:
        oldUserName - the old user name to be changed.
        newUserName - the new user name to be changed to.
        Returns:
        non-null result message string from the reload operation.
        Throws:
        P4JavaException - if an error occurs processing this method and its parameters.
        Since:
        2014.1