com.gridsystems.config.tools.console
Class PasswordField

java.lang.Object
  extended by com.gridsystems.config.tools.console.Field
      extended by com.gridsystems.config.tools.console.ValueField
          extended by com.gridsystems.config.tools.console.PasswordField
All Implemented Interfaces:
ConsoleViewAction

public class PasswordField
extends ValueField

A password entry field.

Version:
1.0
Author:
Rodrigo Ruiz Aguayo

Field Summary
 
Fields inherited from class com.gridsystems.config.tools.console.ValueField
linePattern, trimmed, value, valueFormater, valuePattern, verifier
 
Constructor Summary
PasswordField(java.util.ResourceBundle bundle, java.lang.String linePattern)
          Creates a field of password type.
 
Method Summary
 java.lang.String[] getContents()
          Gets the contents of this field.
protected  java.lang.String readLine()
          Reads a line from the console, and prevents casual viewers from reading it by masking the echoed characters.
 
Methods inherited from class com.gridsystems.config.tools.console.ValueField
execute, getKeyMapping, getStringValue, getValue, getVerifier, isTrimmed, setKeyMapping, setStringValue, setTrimmed, setValue, setVerifier
 
Methods inherited from class com.gridsystems.config.tools.console.Field
getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordField

public PasswordField(java.util.ResourceBundle bundle,
                     java.lang.String linePattern)
Creates a field of password type.

Parameters:
bundle - The resource bundle
linePattern - The line pattern for contents construction
Method Detail

getContents

public java.lang.String[] getContents()
Gets the contents of this field.

Overrides:
getContents in class ValueField
Returns:
The contents of this field

readLine

protected java.lang.String readLine()
                             throws java.io.IOException
Reads a line from the console, and prevents casual viewers from reading it by masking the echoed characters. Reads a line of text from the console.

Overrides:
readLine in class ValueField
Returns:
The read text
Throws:
java.io.IOException - If an error occurs while reading from the console


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