public class PasswordHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PasswordHelper |
getInstance()
Gets the instance attribute of the PasswordHelper class
|
static PasswordHelper |
getInstance(java.lang.String pwdPath)
All calls to this method must supply the same "pwdPath" argument.
|
java.lang.String |
getPassword(java.lang.String username)
Gets the password for supplied username.
|
java.util.Hashtable |
load()
Creates hashtable of users
|
static void |
main(java.lang.String[] args)
The main program for the PasswordHelper class
|
void |
remove(java.lang.String username)
Writes password file with current user information.
|
void |
update(java.lang.String username,
java.lang.String password)
Updates password file with username and password.
|
public static PasswordHelper getInstance(java.lang.String pwdPath)
This is necessary since FileLogin must call this each time through initialize
pwdPath
- NOT YET DOCUMENTEDpublic static PasswordHelper getInstance()
public java.util.Hashtable load() throws java.lang.Exception
java.lang.Exception
- NOT YET DOCUMENTEDpublic static void main(java.lang.String[] args)
args
- The command line argumentspublic java.lang.String getPassword(java.lang.String username) throws java.lang.Exception
username
- username for which to retrieve password.java.lang.Exception
- if User not found for supplied usernamepublic void update(java.lang.String username, java.lang.String password) throws java.lang.Exception
username
- username to be updatedpassword
- password of userjava.lang.Exception
- NOT YET DOCUMENTEDpublic void remove(java.lang.String username) throws java.lang.Exception
java.lang.Exception
- NOT YET DOCUMENTED