All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jnfs.UserTable

java.lang.Object
   |
   +----jnfs.UserTable

public class UserTable
extends Object
implements Serializable
The user table is a public key ring for the users of the file system. It may be written out to secondary storage using save() for persistence.

Version:
$Id: UserTable.java,v 1.4 1997/05/20 17:59:39 mjr Exp $
Author:
Michael John Radwin

Variable Index

 o DEFAULT_TAB_FILE
The default filename to use for save() and load().

Constructor Index

 o UserTable()
Contructs an empty user table.

Method Index

 o get(String)
Gets this user from the user table.
 o getUsernames()
Returns an enumeration of Strings representing the names of FileSystemUsers in the table.
 o getUsers()
Returns an enumeration of all FileSystemUsers in the table.
 o load()
Loads the user information from secondary storage.
 o load(String)
Loads the user information from secondary storage.
 o put(FileSystemUser)
Adds this user to the user table.
 o remove(FileSystemUser)
Removes this user from the user table.
 o remove(String)
Removes this user from the user table.
 o save()
Forces the user information to be written to secondary storage.
 o save(String)
Forces the user information to be written to secondary storage.
 o toString()
Returns a string representation of this object.

Variables

 o DEFAULT_TAB_FILE
 public static final String DEFAULT_TAB_FILE
The default filename to use for save() and load().

Constructors

 o UserTable
 public UserTable()
Contructs an empty user table.

Methods

 o getUsers
 public Enumeration getUsers()
Returns an enumeration of all FileSystemUsers in the table.

 o getUsernames
 public Enumeration getUsernames()
Returns an enumeration of Strings representing the names of FileSystemUsers in the table.

 o put
 public void put(FileSystemUser u)
Adds this user to the user table.

 o get
 public FileSystemUser get(String username)
Gets this user from the user table.

Returns:
the user if it is found; otherwise null.
 o remove
 public boolean remove(FileSystemUser u)
Removes this user from the user table.

Returns:
true if the user was found and successfully removed; false otherwise.
 o remove
 public boolean remove(String username)
Removes this user from the user table.

Returns:
true if the user was found and successfully removed; false otherwise.
 o toString
 public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
 o save
 public boolean save()
Forces the user information to be written to secondary storage.

 o save
 public synchronized boolean save(String filename)
Forces the user information to be written to secondary storage.

 o load
 public static UserTable load()
Loads the user information from secondary storage.

 o load
 public static UserTable load(String filename)
Loads the user information from secondary storage.


All Packages  Class Hierarchy  This Package  Previous  Next  Index