Class PasswdDelegator
java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.PasswdDelegator
- All Implemented Interfaces:
IPasswdDelegator
Implementation to handle the Passwd command.
-
Field Summary
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionPasswdDelegator(IOptionsServer server) Instantiate a new PasswdDelegator, providing the server object that will be used to execute Perforce Helix attribute commands. -
Method Summary
Modifier and TypeMethodDescriptionchangePassword(String oldPassword, String newPassword, String userName) Change a user's password on the server.
-
Constructor Details
-
PasswdDelegator
Instantiate a new PasswdDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server- a concrete implementation of a Perforce Helix Server
-
-
Method Details
-
changePassword
public String changePassword(String oldPassword, String newPassword, String userName) throws P4JavaException Description copied from interface:IPasswdDelegatorChange a user's password on the server. After a password is changed for a user, the user must login again with the new password. Specifying a username as an argument to this command requires 'super' access granted by 'p4 protect'Note: setting the 'newPassword' to null or empty will delete the password.
- Specified by:
changePasswordin interfaceIPasswdDelegator- Parameters:
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'.- Returns:
- result
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-