com.isti.quakewatch.util
Class QWServerLoginInformation

java.lang.Object
  extended by com.isti.util.propertyeditor.LoginInformation
      extended by com.isti.quakewatch.util.QWServerLoginInformation
All Implemented Interfaces:
PropertyEditorInformation

public class QWServerLoginInformation
extends LoginInformation

Class QWServerLoginInformation manages QWServer login information.


Constructor Summary
QWServerLoginInformation()
          Creates empty login information.
QWServerLoginInformation(java.lang.String loginInfoText)
          Creates login information.
QWServerLoginInformation(java.lang.String usernameText, boolean standEncPwdFlag, java.lang.String passwordText)
          Creates login information.
QWServerLoginInformation(java.lang.String usernameText, java.lang.String passwordText)
          Creates login information.
QWServerLoginInformation(java.lang.String usernameText, java.lang.String passwordText, boolean isEncryptedFlag)
          Creates login information.
 
Method Summary
 void copyLoginInfoResources(LoginInformation srcInfoObj)
          Copies resources from the given login-information object into this object.
protected  java.lang.String createEncryptedPassword()
          Creates the encrypted password.
protected  java.lang.String createMemEncKey()
          Creates a memory encryption key.
 java.lang.String getLocalHostAddrInfoStr()
          Returns address information about the local host.
 java.lang.String getLocalHostIPString()
          Returns the local host IP string.
 java.lang.String getLocalHostNameString()
          Returns the local host name string.
 java.lang.String getTransEncPwd()
          Returns the transmit encoded password.
 boolean getTwoWayEncryptionFlag()
          Returns an indicator of whether or not two-way encryption is enabled.
 boolean setTwoWayEncryptionFlag(boolean flgVal)
          Enables or disables two-way encryption.
 
Methods inherited from class com.isti.util.propertyeditor.LoginInformation
clearEncryptedPassword, clearLoginInfoText, equals, equals, getEncryptedPasswordText, getLoginInfoText, getPasswordText, getPropertyEditor, getUsernameText, insertQuoteChars, isEncrypted, isValueStringQuoted, loginAttemptFailed, setLoginDialogMsgStrs, setPasswordText, setPropertyEditor, showLoginDialog, showLoginDialog, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QWServerLoginInformation

public QWServerLoginInformation()
Creates empty login information.


QWServerLoginInformation

public QWServerLoginInformation(java.lang.String loginInfoText)
Creates login information.

Parameters:
loginInfoText - the text the represents the login information.

QWServerLoginInformation

public QWServerLoginInformation(java.lang.String usernameText,
                                java.lang.String passwordText)
Creates login information.

Parameters:
usernameText - the user name text.
passwordText - the password text (not encrypted).

QWServerLoginInformation

public QWServerLoginInformation(java.lang.String usernameText,
                                java.lang.String passwordText,
                                boolean isEncryptedFlag)
Creates login information.

Parameters:
usernameText - the user name text.
passwordText - the password text.
isEncryptedFlag - true if the password text is encrypted.

QWServerLoginInformation

public QWServerLoginInformation(java.lang.String usernameText,
                                boolean standEncPwdFlag,
                                java.lang.String passwordText)
Creates login information.

Parameters:
usernameText - the user name text.
standEncPwdFlag - true if the standard encoded password is given; false if the plain text password is given.
passwordText - the password text.
Method Detail

setTwoWayEncryptionFlag

public boolean setTwoWayEncryptionFlag(boolean flgVal)
Enables or disables two-way encryption. If enabled and the currently-held password is encrypted and can be decrypted then it is converted to clear text.

Parameters:
flgVal - true to enabled two-way encryption; false to disable.
Returns:
true if successful, false if an error occurs.

getTwoWayEncryptionFlag

public boolean getTwoWayEncryptionFlag()
Returns an indicator of whether or not two-way encryption is enabled.

Returns:
true if two-way encryption is enabled; false if disabled.

getLocalHostIPString

public java.lang.String getLocalHostIPString()
Returns the local host IP string. The value returned by this method may be updated by the 'getTransEncPwd()' method.

Returns:
the local host IP string.

getLocalHostNameString

public java.lang.String getLocalHostNameString()
Returns the local host name string. The value returned by this method may be updated by the 'getTransEncPwd()' method.

Returns:
the local host name string.

getLocalHostAddrInfoStr

public java.lang.String getLocalHostAddrInfoStr()
Returns address information about the local host.

Returns:
A new string containing address information about the local host.

getTransEncPwd

public java.lang.String getTransEncPwd()
Returns the transmit encoded password. This method may update the local host name and IP address values returned via the methods 'getLocalHostNameString()' and 'getLocalHostIPString()'.

Returns:
the transmit encoded password.

createMemEncKey

protected java.lang.String createMemEncKey()
Creates a memory encryption key.

Returns:
The memory encryption key text.

createEncryptedPassword

protected java.lang.String createEncryptedPassword()
Creates the encrypted password.

Overrides:
createEncryptedPassword in class LoginInformation
Returns:
the encrypted password.

copyLoginInfoResources

public void copyLoginInfoResources(LoginInformation srcInfoObj)
Copies resources from the given login-information object into this object.

Overrides:
copyLoginInfoResources in class LoginInformation
Parameters:
srcInfoObj - the 'LoginInformation' object from which resources should be copied.