| | |
| | | import static com.forgerock.opendj.cli.Utils.filterExitCode; |
| | | import static com.forgerock.opendj.cli.CommonArguments.*; |
| | | import static com.forgerock.opendj.ldap.tools.Utils.addControlsToRequest; |
| | | import static com.forgerock.opendj.ldap.tools.Utils.ensureLdapProtocolVersionIsSupported; |
| | | import static com.forgerock.opendj.ldap.tools.Utils.printErrorMessage; |
| | | import static com.forgerock.opendj.ldap.tools.Utils.readControls; |
| | | |
| | |
| | | import com.forgerock.opendj.cli.ConnectionFactoryProvider; |
| | | import com.forgerock.opendj.cli.ConsoleApplication; |
| | | import com.forgerock.opendj.cli.FileBasedArgument; |
| | | import com.forgerock.opendj.cli.IntegerArgument; |
| | | import com.forgerock.opendj.cli.StringArgument; |
| | | |
| | | /** |
| | |
| | | FileBasedArgument currentPWFile; |
| | | FileBasedArgument newPWFile; |
| | | BooleanArgument showUsage; |
| | | IntegerArgument ldapProtocolVersion; |
| | | StringArgument currentPW; |
| | | StringArgument controlStr; |
| | | StringArgument newPW; |
| | |
| | | controlStr = controlArgument(); |
| | | argParser.addArgument(controlStr); |
| | | |
| | | ldapProtocolVersion = ldapVersionArgument(); |
| | | argParser.addArgument(ldapProtocolVersion); |
| | | |
| | | verbose = verboseArgument(); |
| | | argParser.addArgument(verbose); |
| | | |
| | |
| | | if (argParser.usageOrVersionDisplayed()) { |
| | | return ResultCode.SUCCESS.intValue(); |
| | | } |
| | | ensureLdapProtocolVersionIsSupported(ldapProtocolVersion); |
| | | |
| | | final PasswordModifyExtendedRequest request = Requests.newPasswordModifyExtendedRequest(); |
| | | addControlsToRequest(request, readControls(controlStr)); |