ottoka commented on a change in pull request #753:
URL: https://github.com/apache/james-project/pull/753#discussion_r752473769



##########
File path: 
server/data/data-cassandra/src/main/java/org/apache/james/user/cassandra/CassandraUsersRepository.java
##########
@@ -0,0 +1,42 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.user.cassandra;
+
+import javax.inject.Inject;
+
+import org.apache.commons.configuration2.HierarchicalConfiguration;
+import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.commons.configuration2.tree.ImmutableNode;
+import org.apache.james.domainlist.api.DomainList;
+import org.apache.james.user.lib.UsersRepositoryImpl;
+
+
+public class CassandraUsersRepository extends 
UsersRepositoryImpl<CassandraUsersDAO> {
+    @Inject
+    public CassandraUsersRepository(DomainList domainList, CassandraUsersDAO 
usersDAO) {
+        super(domainList, usersDAO);
+    }
+
+    @Override
+    public void configure(HierarchicalConfiguration<ImmutableNode> config) 
throws ConfigurationException {
+        super.configure(config);
+        usersDAO.configure(config);

Review comment:
       Never mind, I see what you mean, e.g. like its done for 
`LdapRepositoryConfiguration`. However, the generic `UsersRepositoryImpl` still 
expects `configure(HierarchicalConfiguration<ImmutableNode> configuration)` for 
`virtualHosting`, `administratorId`, `verifyFailureDelay`, all of which are 
private members. Should these be protected instead? Should 
`UsersRepositoryImpl` accept a second type parameter for the configuration 
type? Then there would have to be something like 
`CassandraRepositoryConfiguration extends CommonRepositoryConfigration`, and 
the same for all other repository types. All doable, but this starts to exceed 
the scope of this feature PR. I feel that rewriting it all to configuration 
pojos should be a separate ticket. Please advise how to proceed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to