org.apache.lenya.ac.file
Class FileAccreditableManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.AbstractAccreditableManager
          extended by org.apache.lenya.ac.file.FileAccreditableManager
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.service.Serviceable, AccreditableManager, ItemManagerListener

public class FileAccreditableManager
extends AbstractAccreditableManager
implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.parameters.Parameterizable

File-based accreditable manager.


Field Summary
protected static java.lang.String A_M_TAG
           
protected static java.lang.String DEFAULT_USER_CREATE_USE_CASE
           
protected static java.lang.String DEFAULT_USER_TYPE_CLASS
           
protected static java.lang.String DEFAULT_USER_TYPE_KEY
           
protected static java.lang.String DIRECTORY
           
protected static java.lang.String U_M_CHILD_TAG
           
protected static java.lang.String U_T_CHILD_TAG
           
protected static java.lang.String U_T_CLASS_ATTRIBUTE
           
protected static java.lang.String U_T_CREATE_ATTRIBUTE
           
 
Fields inherited from interface org.apache.lenya.ac.AccreditableManager
ROLE
 
Constructor Summary
FileAccreditableManager()
          Creates a new FileAccreditableManager.
FileAccreditableManager(java.io.File configurationDirectory, UserType[] userTypes)
          Creates a new FileAccessController based on a configuration directory.
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 java.io.File getConfigurationDirectory()
          Returns the configuration directory.
static UserType getDefaultUserType()
          Returns the default user type.
protected  org.apache.avalon.framework.service.ServiceManager getManager()
          Returns the service manager.
 UserType[] getUserTypes()
          Returns the supported user types.
protected  GroupManager initializeGroupManager()
          Initializes the group manager.
protected  IPRangeManager initializeIPRangeManager()
          Initializes the IP range manager.
protected  RoleManager initializeRoleManager()
          Initializes the role manager.
protected  UserManager initializeUserManager()
          Initializes the user manager.
 void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
           
 void service(org.apache.avalon.framework.service.ServiceManager manager)
          Set the global component manager.
 void setConfigurationDirectory(java.io.File file)
          Sets the configuration directory.
 
Methods inherited from class org.apache.lenya.ac.impl.AbstractAccreditableManager
addItemManagerListener, dispose, getGroupManager, getIPRangeManager, getRoleManager, getUserManager, itemAdded, itemRemoved, notifyAdded, notifyRemoved, removeItemManagerListener
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY

protected static final java.lang.String DIRECTORY
See Also:
Constant Field Values

A_M_TAG

protected static final java.lang.String A_M_TAG
See Also:
Constant Field Values

U_M_CHILD_TAG

protected static final java.lang.String U_M_CHILD_TAG
See Also:
Constant Field Values

U_T_CHILD_TAG

protected static final java.lang.String U_T_CHILD_TAG
See Also:
Constant Field Values

U_T_CLASS_ATTRIBUTE

protected static final java.lang.String U_T_CLASS_ATTRIBUTE
See Also:
Constant Field Values

U_T_CREATE_ATTRIBUTE

protected static final java.lang.String U_T_CREATE_ATTRIBUTE
See Also:
Constant Field Values

DEFAULT_USER_TYPE_CLASS

protected static final java.lang.String DEFAULT_USER_TYPE_CLASS

DEFAULT_USER_TYPE_KEY

protected static final java.lang.String DEFAULT_USER_TYPE_KEY
See Also:
Constant Field Values

DEFAULT_USER_CREATE_USE_CASE

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

FileAccreditableManager

public FileAccreditableManager()
Creates a new FileAccreditableManager. If you use this constructor, you have to set the configuration directory either by calling setConfigurationDirectory(File)or by calling parameterize(Parameters).


FileAccreditableManager

public FileAccreditableManager(java.io.File configurationDirectory,
                               UserType[] userTypes)
Creates a new FileAccessController based on a configuration directory.

Parameters:
configurationDirectory - The configuration directory.
userTypes - The supported user types.
Method Detail

getUserTypes

public UserType[] getUserTypes()
                        throws AccessControlException
Returns the supported user types.

Returns:
An array of user types.
Throws:
AccessControlException - if an error occurs.

getConfigurationDirectory

public java.io.File getConfigurationDirectory()
                                       throws AccessControlException
Returns the configuration directory.

Returns:
The configuration directory.
Throws:
AccessControlException - when something went wrong.

parameterize

public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
                  throws org.apache.avalon.framework.parameters.ParameterException
Specified by:
parameterize in interface org.apache.avalon.framework.parameters.Parameterizable
Throws:
org.apache.avalon.framework.parameters.ParameterException
See Also:
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
added to read new user-manager block within accreditable-manager

getDefaultUserType

public static UserType getDefaultUserType()
Returns the default user type.

Returns:
A user type.

setConfigurationDirectory

public void setConfigurationDirectory(java.io.File file)
                               throws AccessControlException
Sets the configuration directory.

Parameters:
file - The configuration directory.
Throws:
AccessControlException - if an error occurs

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Set the global component manager.

Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Parameters:
manager - The global component manager
Throws:
org.apache.avalon.framework.service.ServiceException - when something went wrong.

getManager

protected org.apache.avalon.framework.service.ServiceManager getManager()
Returns the service manager.

Returns:
A service manager.

initializeGroupManager

protected GroupManager initializeGroupManager()
                                       throws AccessControlException
Description copied from class: AbstractAccreditableManager
Initializes the group manager.

Specified by:
initializeGroupManager in class AbstractAccreditableManager
Returns:
A group manager.
Throws:
AccessControlException - when something went wrong.
See Also:
AbstractAccreditableManager.initializeGroupManager()

initializeIPRangeManager

protected IPRangeManager initializeIPRangeManager()
                                           throws AccessControlException
Description copied from class: AbstractAccreditableManager
Initializes the IP range manager.

Specified by:
initializeIPRangeManager in class AbstractAccreditableManager
Returns:
An IP range manager.
Throws:
AccessControlException - when something went wrong.
See Also:
AbstractAccreditableManager.initializeIPRangeManager()

initializeRoleManager

protected RoleManager initializeRoleManager()
                                     throws AccessControlException
Description copied from class: AbstractAccreditableManager
Initializes the role manager.

Specified by:
initializeRoleManager in class AbstractAccreditableManager
Returns:
A role manager.
Throws:
AccessControlException - when something went wrong.
See Also:
AbstractAccreditableManager.initializeRoleManager()

initializeUserManager

protected UserManager initializeUserManager()
                                     throws AccessControlException
Description copied from class: AbstractAccreditableManager
Initializes the user manager.

Specified by:
initializeUserManager in class AbstractAccreditableManager
Returns:
A user manager.
Throws:
AccessControlException - when something went wrong.
See Also:
AbstractAccreditableManager.initializeUserManager()


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