org.apache.lenya.ac.file
Class FileUserManager

java.lang.Object
  extended by org.apache.lenya.ac.file.FileItemManager
      extended by org.apache.lenya.ac.file.FileUserManager
All Implemented Interfaces:
ItemManager, UserManager

public class FileUserManager
extends FileItemManager
implements UserManager

File-based user manager implementation.

Version:
$Id: FileUserManager.java 473841 2006-11-12 00:46:38Z gregor $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.ac.file.FileItemManager
FileItemManager.DirectoryChangeNotifier
 
Field Summary
protected static java.lang.String SUFFIX
           
 
Fields inherited from class org.apache.lenya.ac.file.FileItemManager
PATH
 
Constructor Summary
protected FileUserManager(java.io.File configurationDirectory, UserType[] userTypes)
          Create a UserManager
 
Method Summary
 void add(User user)
          Add the given user
protected  java.lang.String getSuffix()
          Returns the file extension to be used.
 User getUser(java.lang.String userId)
          Get the user with the given user id.
 User[] getUsers()
          Get all users.
 UserType[] getUserTypes()
          Get all supported user types
static FileUserManager instance(java.io.File configurationDirectory, UserType[] userTypes)
          Describe instance method here.
 void remove(User user)
          Remove the given user
 
Methods inherited from class org.apache.lenya.ac.file.FileItemManager
add, addItemManagerListener, contains, getConfigurationDirectory, getFileFilter, getItem, getItemClass, getItemConfiguration, getItems, loadItem, loadItems, notifyAdded, notifyRemoved, remove, removeItem, removeItemManagerListener, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.ac.ItemManager
addItemManagerListener, removeItemManagerListener
 

Field Detail

SUFFIX

protected static final java.lang.String SUFFIX
See Also:
Constant Field Values
Constructor Detail

FileUserManager

protected FileUserManager(java.io.File configurationDirectory,
                          UserType[] userTypes)
                   throws AccessControlException
Create a UserManager

Parameters:
configurationDirectory - for which the UserManager should be instanciated.
userTypes - The supported user types.
Throws:
AccessControlException - if the UserManager could not be instantiated.
Method Detail

instance

public static FileUserManager instance(java.io.File configurationDirectory,
                                       UserType[] userTypes)
                                throws AccessControlException
Describe instance method here.

Parameters:
configurationDirectory - a directory
userTypes - The supported user types.
Returns:
an UserManager value
Throws:
AccessControlException - if an error occurs

getUsers

public User[] getUsers()
Get all users.

Specified by:
getUsers in interface UserManager
Returns:
an Iterator to iterate over all users

add

public void add(User user)
         throws AccessControlException
Description copied from interface: UserManager
Add the given user

Specified by:
add in interface UserManager
Parameters:
user - User that is to be added
Throws:
AccessControlException - when the user is already contained.
See Also:
UserManager.add(org.apache.lenya.ac.User)

remove

public void remove(User user)
            throws AccessControlException
Description copied from interface: UserManager
Remove the given user

Specified by:
remove in interface UserManager
Parameters:
user - User that is to be removed
Throws:
AccessControlException - when the user is not contained.
See Also:
UserManager.remove(org.apache.lenya.ac.User)

getUser

public User getUser(java.lang.String userId)
Get the user with the given user id.

Specified by:
getUser in interface UserManager
Parameters:
userId - user id of requested user
Returns:
the requested user or null if there is no user with the given user id

getUserTypes

public UserType[] getUserTypes()
Description copied from interface: UserManager
Get all supported user types

Specified by:
getUserTypes in interface UserManager
Returns:
a collection of user types
See Also:
UserManager.getUserTypes()

getSuffix

protected java.lang.String getSuffix()
Description copied from class: FileItemManager
Returns the file extension to be used.

Specified by:
getSuffix in class FileItemManager
Returns:
A string.
See Also:
FileItemManager.getSuffix()


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.