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
-
DEFAULT_TAB_FILE
- The default filename to use for save() and load().
-
UserTable()
- Contructs an empty user table.
-
get(String)
- Gets this user from the user table.
-
getUsernames()
- Returns an enumeration of Strings representing the names of
FileSystemUsers in the table.
-
getUsers()
- Returns an enumeration of all FileSystemUsers in the table.
-
load()
- Loads the user information from secondary storage.
-
load(String)
- Loads the user information from secondary storage.
-
put(FileSystemUser)
- Adds this user to the user table.
-
remove(FileSystemUser)
- Removes this user from the user table.
-
remove(String)
- Removes this user from the user table.
-
save()
- Forces the user information to be written to secondary storage.
-
save(String)
- Forces the user information to be written to secondary storage.
-
toString()
- Returns a string representation of this object.
DEFAULT_TAB_FILE
public static final String DEFAULT_TAB_FILE
- The default filename to use for save() and load().
UserTable
public UserTable()
- Contructs an empty user table.
getUsers
public Enumeration getUsers()
- Returns an enumeration of all FileSystemUsers in the table.
getUsernames
public Enumeration getUsernames()
- Returns an enumeration of Strings representing the names of
FileSystemUsers in the table.
put
public void put(FileSystemUser u)
- Adds this user to the user table.
get
public FileSystemUser get(String username)
- Gets this user from the user table.
- Returns:
- the user if it is found; otherwise
null
.
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.
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.
toString
public String toString()
- Returns a string representation of this object.
- Overrides:
- toString in class Object
save
public boolean save()
- Forces the user information to be written to secondary storage.
save
public synchronized boolean save(String filename)
- Forces the user information to be written to secondary storage.
load
public static UserTable load()
- Loads the user information from secondary storage.
load
public static UserTable load(String filename)
- Loads the user information from secondary storage.
All Packages Class Hierarchy This Package Previous Next Index