| | |
| | | import org.opends.server.tools.SSLConnectionException; |
| | | import org.opends.server.admin.client.cli.SecureConnectionCliArgs; |
| | | import com.forgerock.opendj.cli.ArgumentException; |
| | | import com.forgerock.opendj.cli.CLIException; |
| | | import com.forgerock.opendj.cli.ClientException; |
| | | import org.opends.server.util.SelectableCertificateKeyManager; |
| | | import org.opends.admin.ads.ADSContext; |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | |
| | | { |
| | | |
| | | public String validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | hostName = app.readValidatedInput(INFO_LDAP_CONN_PROMPT_HOST_NAME |
| | | .get(hostName), callback); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | { |
| | | |
| | | public Integer validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | } |
| | | portNumber = app.readValidatedInput(askPortNumber, callback); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | |
| | | { |
| | | |
| | | public String validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | providedBindDN = bindDN; |
| | | } |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory |
| | | .unableToReadConnectionParameters(e); |
| | |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw new RuntimeException(e); |
| | | |
| | |
| | | ValidationCallback<String> callback = new ValidationCallback<String>() |
| | | { |
| | | public String validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | truststorePath = app.readValidatedInput( |
| | | INFO_LDAP_CONN_PROMPT_SECURITY_TRUSTSTORE_PATH.get(), callback); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | |
| | | ValidationCallback<String> callback = new ValidationCallback<String>() |
| | | { |
| | | public String validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | keystorePath = app.readValidatedInput( |
| | | INFO_LDAP_CONN_PROMPT_SECURITY_KEYSTORE_PATH.get(), callback); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | throw ArgumentExceptionFactory.unableToReadConnectionParameters(e); |
| | | } |
| | |
| | | new ValidationCallback<String>() |
| | | { |
| | | public String validate(ConsoleApplication app, String input) |
| | | throws CLIException |
| | | throws ClientException |
| | | { |
| | | String ninput = input.trim(); |
| | | if (ninput.length() == 0) |
| | |
| | | INFO_LDAP_CONN_PROMPT_SECURITY_TRUSTSTORE_PATH.get(), |
| | | callback); |
| | | } |
| | | catch (CLIException e) |
| | | catch (ClientException e) |
| | | { |
| | | return true; |
| | | } |
| | |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | catch (CLIException cliE) |
| | | catch (ClientException cliE) |
| | | { |
| | | throw new RuntimeException(cliE); |
| | | } |