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

public final Class HomesUserDatabase

extends Object
implements UserDatabase
Class Inheritance
All Implemented Interfaces
org.apache.catalina.startup.UserDatabase
Imports
java.io.File, java.util.Collections, .Enumeration, .HashMap, .Map

Concrete implementation of the UserDatabase interface considers all directories in a directory whose pathname is specified to our constructor to be "home" directories for those users.
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 username.

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 username.

userConfigback to summary
private UserConfig userConfig

The UserConfig listener with which we are associated.

Constructor Detail

HomesUserDatabaseback to summary
public HomesUserDatabase()

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