DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.security.login
Class PasswordHelper

java.lang.Object
  extended by org.dlese.dpc.schemedit.security.login.PasswordHelper

public class PasswordHelper
extends Object

Manages password entries in the password file.

Author:
Jonathan Ostwald

Method Summary
static PasswordHelper getInstance()
          Gets the instance attribute of the PasswordHelper class
static PasswordHelper getInstance(String pwdPath)
          All calls to this method must supply the same "pwdPath" argument.
 String getPassword(String username)
          Gets the password for supplied username.
 Hashtable load()
          Creates hashtable of users
static void main(String[] args)
          The main program for the PasswordHelper class
 void remove(String username)
          Writes password file with current user information.
 void update(String username, String password)
          Updates password file with username and password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PasswordHelper getInstance(String pwdPath)
All calls to this method must supply the same "pwdPath" argument.

This is necessary since FileLogin must call this each time through initialize

Parameters:
pwdPath - NOT YET DOCUMENTED
Returns:
The instance value

getInstance

public static PasswordHelper getInstance()
Gets the instance attribute of the PasswordHelper class

Returns:
The instance value

load

public Hashtable load()
               throws Exception
Creates hashtable of users

Returns:
NOT YET DOCUMENTED
Throws:
Exception - NOT YET DOCUMENTED

main

public static void main(String[] args)
The main program for the PasswordHelper class

Parameters:
args - The command line arguments

getPassword

public String getPassword(String username)
                   throws Exception
Gets the password for supplied username.

Parameters:
username - username for which to retrieve password.
Returns:
The password value
Throws:
Exception - if User not found for supplied username

update

public void update(String username,
                   String password)
            throws Exception
Updates password file with username and password.

Parameters:
username - username to be updated
password - password of user
Throws:
Exception - NOT YET DOCUMENTED

remove

public void remove(String username)
            throws Exception
Writes password file with current user information.

Throws:
Exception - NOT YET DOCUMENTED

DLESE Tools
v1.6.0