Top Description Fields Constructors Methods
org.apache.catalina.startup

public final Class PasswdUserDatabase

extends Object
implements UserDatabase
Class Inheritance
All Implemented Interfaces
org.apache.catalina.startup.UserDatabase
Imports
java.io.BufferedReader, .FileReader, java.util.Collections, .Enumeration, .HashMap, .Map, org.apache.juli.logging.Log, .LogFactory, org.apache.naming.StringManager

Concrete implementation of the UserDatabase interface that processes the /etc/passwd file on a Unix system.
Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
homes

The set of home directories for all defined users, keyed by user name.

private static final Log
private static final String
PASSWORD_FILE

The pathname of the Unix password file.

private static final StringManager
private UserConfig
userConfig

The UserConfig listener with which we are associated.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getHome(String
User for which a home directory should be retrieved
user
)

Implements org.apache.catalina.startup.UserDatabase.getHome.

Return an absolute pathname to the home directory for the specified user.

public UserConfig
getUserConfig()

Implements org.apache.catalina.startup.UserDatabase.getUserConfig.

Return the UserConfig listener with which we are associated.

public Enumeration<String>
getUsers()

Implements org.apache.catalina.startup.UserDatabase.getUsers.

Return an enumeration of the user names defined on this server.

private void
init()

Initialize our set of users and home directories.

public void
setUserConfig(UserConfig
The new UserConfig listener
userConfig
)

Implements org.apache.catalina.startup.UserDatabase.setUserConfig.

Set the UserConfig listener with which we are associated.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

homesback to summary
private final Map<String, String> homes

The set of home directories for all defined users, keyed by user name.

logback to summary
private static final Log log
PASSWORD_FILEback to summary
private static final String PASSWORD_FILE

The pathname of the Unix password file.

smback to summary
private static final StringManager sm
userConfigback to summary
private UserConfig userConfig

The UserConfig listener with which we are associated.

Constructor Detail

PasswdUserDatabaseback to summary
public PasswdUserDatabase()

Method Detail

getHomeback to summary
public String getHome(String user)

Implements org.apache.catalina.startup.UserDatabase.getHome.

Return an absolute pathname to the home directory for the specified user.

Parameters
user:String

User for which a home directory should be retrieved

Returns:String

Doc from org.apache.catalina.startup.UserDatabase.getHome.

an absolute pathname to the home directory for the specified user.

Annotations
@Override
getUserConfigback to summary
public UserConfig getUserConfig()

Implements org.apache.catalina.startup.UserDatabase.getUserConfig.

Return the UserConfig listener with which we are associated.

Returns:UserConfig

Doc from org.apache.catalina.startup.UserDatabase.getUserConfig.

the UserConfig listener with which we are associated.

Annotations
@Override
getUsersback to summary
public Enumeration<String> getUsers()

Implements org.apache.catalina.startup.UserDatabase.getUsers.

Return an enumeration of the user names defined on this server.

Returns:Enumeration<String>

Doc from org.apache.catalina.startup.UserDatabase.getUsers.

an enumeration of the usernames defined on this server.

Annotations
@Override
initback to summary
private void init()

Initialize our set of users and home directories.

setUserConfigback to summary
public void setUserConfig(UserConfig userConfig)

Implements org.apache.catalina.startup.UserDatabase.setUserConfig.

Set the UserConfig listener with which we are associated.

Parameters
userConfig:UserConfig

The new UserConfig listener

Annotations
@Override