com.izforge.izpack.panels.userinput.validator
Class PasswordKeystoreValidator

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.validator.PasswordKeystoreValidator
All Implemented Interfaces:
Validator

public class PasswordKeystoreValidator
extends Object
implements Validator

This class based on a simple validator for passwords to demonstrate the implementation of a password validator that cooperates with the password field in the UserInputPanel. Additional validation may be done by utilizing the params added to the password field.

Author:
Elmar Grom, Jeff Gordon

Constructor Summary
PasswordKeystoreValidator()
           
 
Method Summary
 boolean validate(ProcessingClient client)
          Validates the ability to open a keystore based on the password and parameters provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordKeystoreValidator

public PasswordKeystoreValidator()
Method Detail

validate

public boolean validate(ProcessingClient client)
Validates the ability to open a keystore based on the password and parameters provided. Must specify parameter 'keystoreFile', and optionally 'keystoreType' (defaults to JKS), 'keystoreAlias' (to check for existence of a key), and 'aliasPassword' (for trying to retrieve the key). An additional parameter 'skipValidation' can be set to 'true' in a checkbox and allow the validator framework to run, but not actually do the validation.

Optionally checking the key password of multiple keys within a keystore requires the keystore password (if different from the key password) be set in the keystorePassword parameter.

Specified by:
validate in interface Validator
Parameters:
client - the processing client
Returns:
true if the validation passes, otherwise false


Copyright © 2018. All rights reserved.