org.apache.james.user.lib
Class AbstractJamesUsersRepository

java.lang.Object
  extended by org.apache.james.user.lib.AbstractUsersRepository
      extended by org.apache.james.user.lib.AbstractJamesUsersRepository
All Implemented Interfaces:
Configurable, LogEnabled, RecipientRewriteTable, JamesUsersRepository, UsersRepository

Deprecated. Please implement UsersRepository

@Deprecated
public abstract class AbstractJamesUsersRepository
extends AbstractUsersRepository
implements JamesUsersRepository, RecipientRewriteTable

A partial implementation of a Repository to store users.

This implements common functionality found in different UsersRespository implementations, and makes it easier to create new User repositories.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.james.rrt.api.RecipientRewriteTable
RecipientRewriteTable.ErrorMappingException
 
Field Summary
protected  boolean enableAliases
          Deprecated. Enable Aliases frmo JamesUser
protected  boolean enableForwarding
          Deprecated. Wether to enable forwarding for JamesUser or not
protected  boolean ignoreCase
          Deprecated. Ignore case in usernames
 
Fields inherited from interface org.apache.james.rrt.api.RecipientRewriteTable
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, WILDCARD
 
Constructor Summary
AbstractJamesUsersRepository()
          Deprecated.  
 
Method Summary
 void addAddressMapping(String user, String domain, String address)
          Deprecated.  
 void addAliasDomainMapping(String aliasDomain, String realDomain)
          Deprecated.  
 void addErrorMapping(String user, String domain, String error)
          Deprecated.  
 void addMapping(String user, String domain, String mapping)
          Deprecated.  
 void addRegexMapping(String user, String domain, String regex)
          Deprecated.  
 void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
          Deprecated.  
protected  void doAddUser(String username, String password)
          Deprecated. Add the user with the given username and password
protected abstract  void doAddUser(User user)
          Deprecated. Adds a user to the underlying Repository.
protected abstract  void doUpdateUser(User user)
          Deprecated. Updates a user record to match the supplied User.
 Map<String,Collection<String>> getAllMappings()
          Deprecated.  
 Collection<String> getMappings(String username, String domain)
          Deprecated.  
 Collection<String> getUserDomainMappings(String user, String domain)
          Deprecated.  
 void removeAddressMapping(String user, String domain, String address)
          Deprecated.  
 void removeAliasDomainMapping(String aliasDomain, String realDomain)
          Deprecated.  
 void removeErrorMapping(String user, String domain, String error)
          Deprecated.  
 void removeMapping(String user, String domain, String mapping)
          Deprecated.  
 void removeRegexMapping(String user, String domain, String regex)
          Deprecated.  
 void setEnableAliases(boolean enableAliases)
          Deprecated.  
 void setEnableForwarding(boolean enableForwarding)
          Deprecated.  
 void setIgnoreCase(boolean ignoreCase)
          Deprecated.  
 void updateUser(User user)
          Deprecated. Update the repository with the specified user object.
 
Methods inherited from class org.apache.james.user.lib.AbstractUsersRepository
addUser, doConfigure, getLogger, isValidUsername, setDomainList, setEnableVirtualHosting, setLog, supportVirtualHosting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.user.api.UsersRepository
addUser, contains, countUsers, getUserByName, list, removeUser, supportVirtualHosting, test
 

Field Detail

ignoreCase

protected boolean ignoreCase
Deprecated. 
Ignore case in usernames


enableAliases

protected boolean enableAliases
Deprecated. 
Enable Aliases frmo JamesUser


enableForwarding

protected boolean enableForwarding
Deprecated. 
Wether to enable forwarding for JamesUser or not

Constructor Detail

AbstractJamesUsersRepository

public AbstractJamesUsersRepository()
Deprecated. 
Method Detail

configure

public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
               throws org.apache.commons.configuration.ConfigurationException
Deprecated. 
Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractUsersRepository
Throws:
org.apache.commons.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)

doAddUser

protected abstract void doAddUser(User user)
                           throws UsersRepositoryException
Deprecated. 
Adds a user to the underlying Repository. The user name must not clash with an existing user.

Parameters:
user - the user to add
Throws:
UsersRepositoryException

doUpdateUser

protected abstract void doUpdateUser(User user)
                              throws UsersRepositoryException
Deprecated. 
Updates a user record to match the supplied User.

Parameters:
user - the user to update
Throws:
UsersRepositoryException

doAddUser

protected void doAddUser(String username,
                         String password)
                  throws UsersRepositoryException
Deprecated. 
Description copied from class: AbstractUsersRepository
Add the user with the given username and password

Specified by:
doAddUser in class AbstractUsersRepository
Throws:
UsersRepositoryException - If an error occurred
See Also:
AbstractUsersRepository.doAddUser(java.lang.String, java.lang.String)

updateUser

public void updateUser(User user)
                throws UsersRepositoryException
Deprecated. 
Update the repository with the specified user object. A user object with this username must already exist.

Specified by:
updateUser in interface UsersRepository
Parameters:
user - the user to be updated
Throws:
UsersRepositoryException

getMappings

public Collection<String> getMappings(String username,
                                      String domain)
                               throws RecipientRewriteTable.ErrorMappingException,
                                      RecipientRewriteTableException
Deprecated. 
Specified by:
getMappings in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException
RecipientRewriteTable.ErrorMappingException
See Also:
RecipientRewriteTable.getMappings(java.lang.String, java.lang.String)

setEnableAliases

public void setEnableAliases(boolean enableAliases)
Deprecated. 
Specified by:
setEnableAliases in interface JamesUsersRepository
See Also:
JamesUsersRepository.setEnableAliases(boolean)

setEnableForwarding

public void setEnableForwarding(boolean enableForwarding)
Deprecated. 
Specified by:
setEnableForwarding in interface JamesUsersRepository
See Also:
JamesUsersRepository.setEnableForwarding(boolean)

setIgnoreCase

public void setIgnoreCase(boolean ignoreCase)
Deprecated. 
Specified by:
setIgnoreCase in interface JamesUsersRepository
See Also:
JamesUsersRepository.setIgnoreCase(boolean)

getAllMappings

public Map<String,Collection<String>> getAllMappings()
                                              throws RecipientRewriteTableException
Deprecated. 
Specified by:
getAllMappings in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
RecipientRewriteTable.getAllMappings()

getUserDomainMappings

public Collection<String> getUserDomainMappings(String user,
                                                String domain)
                                         throws RecipientRewriteTableException
Deprecated. 
Specified by:
getUserDomainMappings in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException
See Also:
RecipientRewriteTable.getUserDomainMappings(java.lang.String, java.lang.String)

addRegexMapping

public void addRegexMapping(String user,
                            String domain,
                            String regex)
                     throws RecipientRewriteTableException
Deprecated. 
Specified by:
addRegexMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

removeRegexMapping

public void removeRegexMapping(String user,
                               String domain,
                               String regex)
                        throws RecipientRewriteTableException
Deprecated. 
Specified by:
removeRegexMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

addAddressMapping

public void addAddressMapping(String user,
                              String domain,
                              String address)
                       throws RecipientRewriteTableException
Deprecated. 
Specified by:
addAddressMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

removeAddressMapping

public void removeAddressMapping(String user,
                                 String domain,
                                 String address)
                          throws RecipientRewriteTableException
Deprecated. 
Specified by:
removeAddressMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

addErrorMapping

public void addErrorMapping(String user,
                            String domain,
                            String error)
                     throws RecipientRewriteTableException
Deprecated. 
Specified by:
addErrorMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

removeErrorMapping

public void removeErrorMapping(String user,
                               String domain,
                               String error)
                        throws RecipientRewriteTableException
Deprecated. 
Specified by:
removeErrorMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

addMapping

public void addMapping(String user,
                       String domain,
                       String mapping)
                throws RecipientRewriteTableException
Deprecated. 
Specified by:
addMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

removeMapping

public void removeMapping(String user,
                          String domain,
                          String mapping)
                   throws RecipientRewriteTableException
Deprecated. 
Specified by:
removeMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

addAliasDomainMapping

public void addAliasDomainMapping(String aliasDomain,
                                  String realDomain)
                           throws RecipientRewriteTableException
Deprecated. 
Specified by:
addAliasDomainMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException

removeAliasDomainMapping

public void removeAliasDomainMapping(String aliasDomain,
                                     String realDomain)
                              throws RecipientRewriteTableException
Deprecated. 
Specified by:
removeAliasDomainMapping in interface RecipientRewriteTable
Throws:
RecipientRewriteTableException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.