public class PasswdDelegator extends BaseDelegator implements IPasswdDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
PasswdDelegator(IOptionsServer server)
Instantiate a new PasswdDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword,
java.lang.String userName)
Change a user's password on the server.
|
public PasswdDelegator(IOptionsServer server)
server
- a concrete implementation of a Perforce Helix Serverpublic java.lang.String changePassword(java.lang.String oldPassword, java.lang.String newPassword, java.lang.String userName) throws P4JavaException
IPasswdDelegator
Note: setting the 'newPassword' to null or empty will delete the password.
changePassword
in interface IPasswdDelegator
oldPassword
- possibly-null or possibly-empty user's old password. If null
or empty, it assumes the current password is not set.newPassword
- non-null and non-empty user's new password.userName
- possibly-null possibly-null name of the target user whose
password will be changed to the new password. If null, the
current user will be used. If non-null, this command requires
'super' access granted by 'p4 protect'.P4JavaException
- if any error occurs in the processing of this method.