org.apache.lenya.ac.file
Class FileUser
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.ac.impl.AbstractItem
org.apache.lenya.ac.impl.AbstractGroupable
org.apache.lenya.ac.impl.AbstractUser
org.apache.lenya.ac.file.FileUser
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.ac.Accreditable, org.apache.lenya.ac.Groupable, org.apache.lenya.ac.Identifiable, org.apache.lenya.ac.Item, org.apache.lenya.ac.User
- Direct Known Subclasses:
- CIFSUser
public class FileUser
- extends AbstractUser
- implements org.apache.lenya.ac.Item, java.io.Serializable
File-based user implementation.
- Version:
- $Id: FileUser.java 485769 2006-12-11 17:41:23Z andreas $
- See Also:
- Serialized Form
Field Summary |
protected static java.lang.String |
DOCUMENT_LOCALE
|
protected static java.lang.String |
EMAIL
|
protected static java.lang.String |
GROUP
|
protected static java.lang.String |
GROUPS
|
protected static java.lang.String |
ID
|
protected static java.lang.String |
MENU_LOCALE
|
protected static java.lang.String |
PASSWORD
|
protected static java.lang.String |
PASSWORD_ATTRIBUTE
|
Constructor Summary |
FileUser(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger)
Creates a new FileUser object. |
FileUser(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger,
java.lang.String id,
java.lang.String fullName,
java.lang.String email,
java.lang.String password)
Create a FileUser |
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
Configure this FileUser. |
protected org.apache.avalon.framework.configuration.Configuration |
createConfiguration()
Create a configuration from the current user details. |
void |
delete()
Delete a user |
protected java.io.File |
getConfigurationDirectory()
Returns the configuration directory. |
protected java.io.File |
getFile()
Returns the configuration file. |
void |
save()
Save the user |
protected void |
setConfigurationDirectory(java.io.File _configurationDirectory)
|
Methods inherited from class org.apache.lenya.ac.impl.AbstractUser |
authenticate, canChangePassword, getDefaultDocumentLocale, getDefaultMenuLocale, getEmail, getEncryptedPassword, setDefaultDocumentLocale, setDefaultMenuLocale, setEmail, setEncryptedPassword, setPassword |
Methods inherited from class org.apache.lenya.ac.impl.AbstractItem |
compareTo, equals, getAccreditableManager, getDescription, getId, getItemManager, getName, hashCode, setDescription, setId, setName, toString |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.lenya.ac.Item |
getDescription, getId, getItemManager, getName, setDescription, setName |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
Methods inherited from interface org.apache.lenya.ac.User |
getAccreditableManager |
Methods inherited from interface org.apache.lenya.ac.Accreditable |
getAccreditables |
Methods inherited from interface org.apache.lenya.ac.Groupable |
addedToGroup, getGroups, removedFromGroup, removeFromAllGroups |
ID
protected static final java.lang.String ID
- See Also:
- Constant Field Values
EMAIL
protected static final java.lang.String EMAIL
- See Also:
- Constant Field Values
MENU_LOCALE
protected static final java.lang.String MENU_LOCALE
- See Also:
- Constant Field Values
DOCUMENT_LOCALE
protected static final java.lang.String DOCUMENT_LOCALE
- See Also:
- Constant Field Values
PASSWORD
protected static final java.lang.String PASSWORD
- See Also:
- Constant Field Values
GROUPS
protected static final java.lang.String GROUPS
- See Also:
- Constant Field Values
GROUP
protected static final java.lang.String GROUP
- See Also:
- Constant Field Values
PASSWORD_ATTRIBUTE
protected static final java.lang.String PASSWORD_ATTRIBUTE
- See Also:
- Constant Field Values
FileUser
public FileUser(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger)
- Creates a new FileUser object.
- Parameters:
itemManager
- The item manager.logger
- The logger.
FileUser
public FileUser(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger,
java.lang.String id,
java.lang.String fullName,
java.lang.String email,
java.lang.String password)
- Create a FileUser
- Parameters:
itemManager
- The item manager.logger
- The logger.id
- the user idfullName
- the full name of the useremail
- the users email addresspassword
- the users password
configure
public void configure(org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Configure this FileUser.
- Specified by:
configure
in interface org.apache.lenya.ac.Item
- Parameters:
config
- where the user details are specified
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- if the necessary details aren't specified
in the config
createConfiguration
protected org.apache.avalon.framework.configuration.Configuration createConfiguration()
- Create a configuration from the current user details. Can be used for
saving.
- Returns:
- a
Configuration
save
public void save()
throws org.apache.lenya.ac.AccessControlException
- Description copied from class:
AbstractUser
- Save the user
- Specified by:
save
in interface org.apache.lenya.ac.User
- Specified by:
save
in class AbstractUser
- Throws:
org.apache.lenya.ac.AccessControlException
- if the save failed- See Also:
User.save()
delete
public void delete()
throws org.apache.lenya.ac.AccessControlException
- Description copied from class:
AbstractUser
- Delete a user
- Specified by:
delete
in interface org.apache.lenya.ac.User
- Overrides:
delete
in class AbstractUser
- Throws:
org.apache.lenya.ac.AccessControlException
- if the delete failed- See Also:
User.delete()
getFile
protected java.io.File getFile()
- Returns the configuration file.
- Returns:
- A file object.
getConfigurationDirectory
protected java.io.File getConfigurationDirectory()
- Returns the configuration directory.
- Returns:
- A file object.
setConfigurationDirectory
protected void setConfigurationDirectory(java.io.File _configurationDirectory)
Copyright © $ Apache Software Foundation. All Rights Reserved.