com.gridsystems.config.tools
Class PasswordVerifier

java.lang.Object
  extended by javax.swing.InputVerifier
      extended by com.gridsystems.config.tools.TextVerifier
          extended by com.gridsystems.config.tools.PasswordVerifier

public class PasswordVerifier
extends TextVerifier

Verifies that a password field has a proper length and no forbiden symbols.

Author:
SJM

Field Summary
static java.lang.String BAD_CHAR_ERROR
          Bad characters in password key.
static java.lang.String TOO_LONG_ERROR
          Too long error key.
static java.lang.String TOO_SHORT_ERROR
          Too short error key.
 
Fields inherited from class com.gridsystems.config.tools.TextVerifier
support
 
Constructor Summary
PasswordVerifier(ErrorSupport support, int minLength, int maxLength)
          Creates an instance.
 
Method Summary
 void cleanErrors()
          Removes from the error support manager the list of errors of this verifier.
 boolean verify(java.lang.String text)
          Validates a text string.
 
Methods inherited from class com.gridsystems.config.tools.TextVerifier
updateError, verify
 
Methods inherited from class javax.swing.InputVerifier
shouldYieldFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOO_SHORT_ERROR

public static final java.lang.String TOO_SHORT_ERROR
Too short error key.

See Also:
Constant Field Values

TOO_LONG_ERROR

public static final java.lang.String TOO_LONG_ERROR
Too long error key.

See Also:
Constant Field Values

BAD_CHAR_ERROR

public static final java.lang.String BAD_CHAR_ERROR
Bad characters in password key.

See Also:
Constant Field Values
Constructor Detail

PasswordVerifier

public PasswordVerifier(ErrorSupport support,
                        int minLength,
                        int maxLength)
Creates an instance.

Parameters:
support - The ErrorSupport instance
minLength - Password minimum length
maxLength - Password maximum length
Method Detail

verify

public boolean verify(java.lang.String text)
Validates a text string.

Specified by:
verify in class TextVerifier
Parameters:
text - The string to validate
Returns:
true if the text is valid

cleanErrors

public void cleanErrors()
Description copied from class: TextVerifier
Removes from the error support manager the list of errors of this verifier.

This method will be used on field deactivation.

Specified by:
cleanErrors in class TextVerifier
See Also:
TextVerifier.cleanErrors()


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.