Author: norman
Date: Wed Jan 27 20:10:25 2010
New Revision: 903815
URL: http://svn.apache.org/viewvc?rev=903815&view=rev
Log:
UserStoreImpl now supports handling the lookup of default
Modified:
james/server/trunk/avalon-user-function/src/main/java/org/apache/james/core/UsersStoreImpl.java
james/server/trunk/spring-deployment/src/main/config/james/james-config.xml
james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml
Modified:
james/server/trunk/avalon-user-function/src/main/java/org/apache/james/core/UsersStoreImpl.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/avalon-user-function/src/main/java/org/apache/james/core/UsersStoreImpl.java?rev=903815&r1=903814&r2=903815&view=diff
==============================================================================
---
james/server/trunk/avalon-user-function/src/main/java/org/apache/james/core/UsersStoreImpl.java
(original)
+++
james/server/trunk/avalon-user-function/src/main/java/org/apache/james/core/UsersStoreImpl.java
Wed Jan 27 20:10:25 2010
@@ -37,6 +37,8 @@
implements UsersStore {
+ private String defaultName;
+
/**
* Get the repository, if any, whose name corresponds to
* the argument parameter
@@ -46,6 +48,10 @@
* @return the UsersRepository corresponding to the name parameter
*/
public UsersRepository getRepository(String name) {
+ if (name == null || name.trim().equals("")) {
+ name = defaultName;
+ }
+
UsersRepository response = getObject(name);
if ((response == null) && (getLogger().isWarnEnabled())) {
getLogger().warn("No users repository called: " + name);
@@ -53,6 +59,10 @@
return response;
}
+ public void setDefaultRepository(String defaultName) {
+ this.defaultName = defaultName;
+ }
+
/**
* Yield an <code>Iterator</code> over the set of repository
* names managed internally by this store.
Modified:
james/server/trunk/spring-deployment/src/main/config/james/james-config.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/james-config.xml?rev=903815&r1=903814&r2=903815&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/james-config.xml
(original)
+++ james/server/trunk/spring-deployment/src/main/config/james/james-config.xml
Wed Jan 27 20:10:25 2010
@@ -1390,7 +1390,6 @@
<!-- in the <database-connections> configuration section. -->
<!-- The DefaultVirtualUserTable for storing James' VirtualUserTable
mappings. -->
- <!-- TEMPORARY DEFAULT: db using Derby -->
<table name="DefaultVirtualUserTable"
class="org.apache.james.vut.JDBCVirtualUserTable"
destinationURL="db://maildb/VirtualUserTable">
<recursiveMapping> true </recursiveMapping>
<mappingLimit> 10 </mappingLimit>
Modified:
james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml?rev=903815&r1=903814&r2=903815&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml
(original)
+++ james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml
Wed Jan 27 20:10:25 2010
@@ -149,7 +149,9 @@
class="org.apache.james.mailrepository.MailStoreSpoolRepository" />
<!-- The User Storage block -->
- <bean id="users-store" class="org.apache.james.core.UsersStoreImpl" />
+ <bean id="users-store" class="org.apache.james.core.UsersStoreImpl" >
+ <property name="defaultRepository" value="LocalUsers"/>
+ </bean>
<!--
This is needed to link the smtpserver to the local user
repository
@@ -176,7 +178,7 @@
<!-- VirtualUserTable Store -->
<bean id="virtualusertable-store"
class="org.apache.james.core.VirtualUserTableStoreImpl">
- <property name="defaultTable" value="defaultvirtualusertable"/>
+ <property name="defaultTable" value="DefaultVirtualUserTable"/>
</bean>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]