com.sshtools.ui.swing
Class PasswordPair

java.lang.Object
  extended by com.sshtools.ui.swing.PasswordPair
All Implemented Interfaces:
java.lang.Comparable

public class PasswordPair
extends java.lang.Object
implements java.lang.Comparable

PasswordPair pairs a PasswordKey with the actual password


Constructor Summary
PasswordPair(PasswordKey key, java.lang.String userPassword, boolean persistant, boolean encrypted)
          Creates a new PasswordPair object.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 PasswordKey getKey()
          Get the key for the password pair
 java.lang.String getUserPassword()
          Get the password for the password pair
 boolean isEncrypted()
          Get whether the password pair is encrypted
 boolean isPersistant()
          Get whether the password pair should be saved permanently.
 void setEncrypted(boolean encrypted)
          Set whether the password pair is encrypted
 void setKey(PasswordKey key)
          Set the key for this password pair
 void setPersistant(boolean persistant)
          Set whether the password pair should be saved permanently.
 void setUserPassword(java.lang.String userPassword)
          Set the password for the password pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordPair

public PasswordPair(PasswordKey key,
                    java.lang.String userPassword,
                    boolean persistant,
                    boolean encrypted)
Creates a new PasswordPair object.

Parameters:
key - key
userPassword - password
persistant - save the password permanently
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

setKey

public void setKey(PasswordKey key)
Set the key for this password pair

Parameters:
key - key

getKey

public PasswordKey getKey()
Get the key for the password pair

Returns:
key

setUserPassword

public void setUserPassword(java.lang.String userPassword)
Set the password for the password pair

Parameters:
userPassword - password

getUserPassword

public java.lang.String getUserPassword()
Get the password for the password pair

Returns:
password

setPersistant

public void setPersistant(boolean persistant)
Set whether the password pair should be saved permanently.

Parameters:
persistant - save password permanently

isPersistant

public boolean isPersistant()
Get whether the password pair should be saved permanently.

Returns:
save password permanently

setEncrypted

public void setEncrypted(boolean encrypted)
Set whether the password pair is encrypted

Parameters:
encrypted - encrypted

isEncrypted

public boolean isEncrypted()
Get whether the password pair is encrypted

Returns:
encrypted


Copyright © 2003-2009 SSHTOOLS LTD. All Rights Reserved.