org.apache.james.user.lib
Class AbstractUsersRepository

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

public abstract class AbstractUsersRepository
extends Object
implements UsersRepository, LogEnabled, Configurable


Constructor Summary
AbstractUsersRepository()
           
 
Method Summary
 void addUser(String username, String password)
           
 void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
           
protected abstract  void doAddUser(String username, String password)
          Add the user with the given username and password
protected  void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
           
protected  org.slf4j.Logger getLogger()
           
protected  void isValidUsername(String username)
           
 void setDomainList(DomainList domainList)
           
 void setEnableVirtualHosting(boolean virtualHosting)
           
 void setLog(org.slf4j.Logger logger)
           
 boolean 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
contains, countUsers, getUserByName, list, removeUser, test, updateUser
 

Constructor Detail

AbstractUsersRepository

public AbstractUsersRepository()
Method Detail

getLogger

protected org.slf4j.Logger getLogger()

setLog

public void setLog(org.slf4j.Logger logger)
Specified by:
setLog in interface LogEnabled
See Also:
LogEnabled.setLog(org.slf4j.Logger)

configure

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

doConfigure

protected void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
                    throws org.apache.commons.configuration.ConfigurationException
Throws:
org.apache.commons.configuration.ConfigurationException

setEnableVirtualHosting

public void setEnableVirtualHosting(boolean virtualHosting)

setDomainList

public void setDomainList(DomainList domainList)

isValidUsername

protected void isValidUsername(String username)
                        throws UsersRepositoryException
Throws:
UsersRepositoryException

addUser

public void addUser(String username,
                    String password)
             throws UsersRepositoryException
Specified by:
addUser in interface UsersRepository
Throws:
UsersRepositoryException
See Also:
UsersRepository.addUser(java.lang.String, java.lang.String)

supportVirtualHosting

public boolean supportVirtualHosting()
                              throws UsersRepositoryException
Specified by:
supportVirtualHosting in interface UsersRepository
Throws:
UsersRepositoryException
See Also:
UsersRepository.supportVirtualHosting()

doAddUser

protected abstract void doAddUser(String username,
                                  String password)
                           throws UsersRepositoryException
Add the user with the given username and password

Parameters:
username -
password -
Throws:
UsersRepositoryException - If an error occurred


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