Author: btellier
Date: Fri Jun 26 16:17:05 2015
New Revision: 1687793
URL: http://svn.apache.org/r1687793
Log:
MPT-17 rename ImapHostSystem into JamesImapHostSystem and create a more general
ImapHostSystem interface - contributed by Matthieu Baechlor
Added:
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/api/ImapHostSystem.java
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
Modified:
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/host/ExternalHostSystem.java
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
Added:
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/api/ImapHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/core/src/main/java/org/apache/james/mpt/api/ImapHostSystem.java?rev=1687793&view=auto
==============================================================================
---
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/api/ImapHostSystem.java
(added)
+++
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/api/ImapHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -0,0 +1,28 @@
+/****************************************************************
+ * 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.mpt.api;
+
+import org.apache.james.mailbox.model.MailboxPath;
+
+public interface ImapHostSystem extends HostSystem {
+
+ public abstract void createMailbox(MailboxPath mailboxPath)
+ throws Exception;
+
+}
\ No newline at end of file
Modified:
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/host/ExternalHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/core/src/main/java/org/apache/james/mpt/host/ExternalHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/host/ExternalHostSystem.java
(original)
+++
james/mpt/trunk/core/src/main/java/org/apache/james/mpt/host/ExternalHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -19,7 +19,9 @@
package org.apache.james.mpt.host;
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.commons.lang.NotImplementedException;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.api.Monitor;
import org.apache.james.mpt.api.UserAdder;
import org.apache.james.mpt.session.ExternalSessionFactory;
@@ -35,7 +37,7 @@ import org.apache.james.mpt.session.Exte
* case.
* </p>
*/
-public class ExternalHostSystem extends ExternalSessionFactory implements
HostSystem {
+public class ExternalHostSystem extends ExternalSessionFactory implements
ImapHostSystem {
private final UserAdder userAdder;
@@ -79,6 +81,10 @@ public class ExternalHostSystem extends
return true;
}
+ public void createMailbox(MailboxPath mailboxPath) throws Exception {
+ throw new NotImplementedException();
+ }
+
public void beforeTests() throws Exception {
}
Modified:
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -1,7 +1,7 @@
package org.apache.james.mpt.imapmailbox.cassandra;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.cassandra.host.CassandraHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -32,10 +32,10 @@ import org.apache.james.mailbox.model.Ma
import org.apache.james.mailbox.store.JVMMailboxPathLocker;
import org.apache.james.mailbox.store.MockAuthenticator;
import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
-public class CassandraHostSystem extends ImapHostSystem {
+public class CassandraHostSystem extends JamesImapHostSystem {
private final CassandraMailboxManager mailboxManager;
private final MockAuthenticator userManager;
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java?rev=1687793&view=auto
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
(added)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -0,0 +1,270 @@
+/****************************************************************
+ * 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.mpt.host;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.james.imap.api.process.ImapProcessor;
+import org.apache.james.imap.decode.ImapDecoder;
+import org.apache.james.imap.decode.main.ImapRequestStreamHandler;
+import org.apache.james.imap.encode.ImapEncoder;
+import org.apache.james.mailbox.MailboxSession.User;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mpt.api.Continuation;
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.session.ImapSessionImpl;
+import org.slf4j.LoggerFactory;
+
+public abstract class JamesImapHostSystem implements ImapHostSystem {
+
+ private ImapDecoder decoder;
+
+ private ImapEncoder encoder;
+
+ private ImapProcessor processor;
+
+ private final Set<User> users;
+
+ public JamesImapHostSystem() {
+ super();
+ users = new HashSet<User>();
+ }
+
+ public void configure(final ImapDecoder decoder, final ImapEncoder encoder,
+ final ImapProcessor processor) {
+ this.decoder = decoder;
+ this.encoder = encoder;
+ this.processor = processor;
+ }
+
+ public Session newSession(Continuation continuation)
+ throws Exception {
+ return new Session(continuation);
+ }
+
+ public void beforeTest() throws Exception {
+ }
+
+ public void afterTest() throws Exception {
+ users.clear();
+ resetData();
+ }
+
+ protected abstract void resetData() throws Exception;
+
+ /* (non-Javadoc)
+ * @see
org.apache.james.mpt.host.ImapHostSystem#createMailbox(org.apache.james.mailbox.model.MailboxPath)
+ */
+ public abstract void createMailbox(MailboxPath mailboxPath) throws
Exception;
+
+ public String getHelloName() {
+ return "JAMES";
+ }
+
+ public ImapDecoder getImapDecoder() {
+ return decoder;
+ }
+
+ public ImapEncoder getImapEncoder() {
+ return encoder;
+ }
+
+ public ImapProcessor getImapProcessor() {
+ return processor;
+ }
+
+ public int getResetLength() {
+ return Integer.MAX_VALUE;
+ }
+
+ public int countUsers() {
+ return users.size();
+ }
+
+ public String getRealName(String name) {
+ return name;
+ }
+
+ class Session implements org.apache.james.mpt.api.Session {
+ ByteBufferOutputStream out;
+
+ ByteBufferInputStream in;
+
+ ImapRequestStreamHandler handler;
+
+ ImapSessionImpl session;
+
+ boolean isReadLast = true;
+
+ public Session(Continuation continuation) {
+ out = new ByteBufferOutputStream(continuation);
+ in = new ByteBufferInputStream();
+ handler = new ImapRequestStreamHandler(decoder, processor,
encoder);
+ session = new
ImapSessionImpl(LoggerFactory.getLogger("sessionLog"));
+ }
+
+ public String readLine() throws Exception {
+ if (!isReadLast) {
+ handler.handleRequest(in, out, session);
+ isReadLast = true;
+ }
+ final String result = out.nextLine();
+ return result;
+ }
+
+ public void start() throws Exception {
+ // Welcome message handled in the server
+ out.write("* OK IMAP4rev1 Server ready\r\n");
+ }
+
+ public void stop() throws Exception {
+ session.deselect();
+ }
+
+ public void writeLine(String line) throws Exception {
+ isReadLast = false;
+ in.nextLine(line);
+ }
+
+ public void forceConnectionClose(String byeMessage) {
+ try {
+ out.write(byeMessage);
+ session.deselect();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ static class ByteBufferInputStream extends InputStream {
+
+ ByteBuffer buffer = ByteBuffer.allocate(16384);
+
+ CharsetEncoder encoder = Charset.forName("ASCII").newEncoder();
+
+ boolean readLast = true;
+
+ public int read() throws IOException {
+ if (!readLast) {
+ readLast = true;
+ buffer.flip();
+ }
+ int result = -1;
+ if (buffer.hasRemaining()) {
+ result = buffer.get();
+ }
+ return result;
+ }
+
+ public void nextLine(String line) {
+ if (buffer.position() > 0 && readLast) {
+ buffer.compact();
+ }
+ encoder.encode(CharBuffer.wrap(line), buffer, true);
+ buffer.put((byte) '\r');
+ buffer.put((byte) '\n');
+ readLast = false;
+ }
+ }
+
+ static class ByteBufferOutputStream extends OutputStream {
+ ByteBuffer buffer = ByteBuffer.allocate(65536);
+
+ Charset ascii = Charset.forName("ASCII");
+
+ Continuation continuation;
+
+ boolean matchPlus = false;
+
+ boolean matchCR = false;
+
+ boolean matchLF = false;
+
+ public ByteBufferOutputStream(Continuation continuation) {
+ this.continuation = continuation;
+ }
+
+ public void write(String message) throws IOException {
+ ascii.newEncoder().encode(CharBuffer.wrap(message), buffer, true);
+ }
+
+ public void write(int b) throws IOException {
+ buffer.put((byte) b);
+ if (b == '\n' && matchPlus && matchCR && matchLF) {
+ matchPlus = false;
+ matchCR = false;
+ matchLF = false;
+ continuation.doContinue();
+ } else if (b == '\n') {
+ matchLF = true;
+ matchPlus = false;
+ matchCR = false;
+ } else if (b == '+' && matchLF) {
+ matchPlus = true;
+ matchCR = false;
+ } else if (b == '\r' && matchPlus && matchLF) {
+ matchCR = true;
+ } else {
+ matchPlus = false;
+ matchCR = false;
+ matchLF = false;
+ }
+ }
+
+ public String nextLine() throws Exception {
+ buffer.flip();
+ byte last = 0;
+ while (buffer.hasRemaining()) {
+ byte next = buffer.get();
+ if (last == '\r' && next == '\n') {
+ break;
+ }
+ last = next;
+ }
+ final ByteBuffer readOnlyBuffer = buffer.asReadOnlyBuffer();
+ readOnlyBuffer.flip();
+ int limit = readOnlyBuffer.limit() - 2;
+ if (limit < 0) {
+ limit = 0;
+ }
+ readOnlyBuffer.limit(limit);
+ String result = ascii.decode(readOnlyBuffer).toString();
+ buffer.compact();
+ return result;
+ }
+ }
+
+ public void afterTests() throws Exception {
+ // default do nothing
+ }
+
+ public void beforeTests() throws Exception {
+ // default do nothing
+ }
+
+}
Modified:
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
Fri Jun 26 16:17:05 2015
@@ -24,7 +24,7 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mailbox.model.MailboxPath;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
import org.junit.Test;
Modified:
james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -1,6 +1,7 @@
package org.apache.james.mpt.imapmailbox.cyrus;
import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.api.UserAdder;
import org.apache.james.mpt.host.ExternalHostSystem;
import org.apache.james.mpt.imapmailbox.cyrus.host.CyrusHostSystem;
@@ -16,6 +17,7 @@ public class CyrusMailboxTestModule exte
protected void configure() {
bind(Docker.class).toInstance(new Docker("linagora/cyrus-imap"));
bind(ContainerCreation.class).toProvider(CyrusHostSystem.class);
+ bind(ImapHostSystem.class).to(CyrusHostSystem.class);
bind(HostSystem.class).to(CyrusHostSystem.class);
bind(ExternalHostSystem.class).to(CyrusHostSystem.class);
bind(UserAdder.class).to(CyrusUserAdder.class);
Modified:
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -1,7 +1,7 @@
package org.apache.james.mpt.imapmailbox.hbase;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -42,11 +42,11 @@ import org.apache.james.mailbox.hbase.ma
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.store.MockAuthenticator;
import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
import org.slf4j.LoggerFactory;
-public class HBaseHostSystem extends ImapHostSystem {
+public class HBaseHostSystem extends JamesImapHostSystem {
public static final String META_DATA_DIRECTORY = "target/user-meta-data";
public static HBaseHostSystem host = null;
@@ -61,7 +61,7 @@ public class HBaseHostSystem extends Ima
private MiniHBaseCluster hbaseCluster;
private Configuration conf;
- public static synchronized ImapHostSystem build() throws Exception {
+ public static synchronized JamesImapHostSystem build() throws Exception {
if (host == null) {
host = new HBaseHostSystem(useMiniCluster);
}
Modified:
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -19,7 +19,7 @@
package org.apache.james.mpt.imapmailbox.inmemory;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -33,16 +33,16 @@ import org.apache.james.mailbox.model.Ma
import org.apache.james.mailbox.store.MockAuthenticator;
import org.apache.james.mailbox.store.StoreMailboxManager;
import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
-public class InMemoryHostSystem extends ImapHostSystem {
+public class InMemoryHostSystem extends JamesImapHostSystem {
private StoreMailboxManager<Long> mailboxManager;
private MockAuthenticator userManager;
private InMemoryMailboxSessionMapperFactory factory;
- public static ImapHostSystem build() throws Exception {
+ public static JamesImapHostSystem build() throws Exception {
InMemoryHostSystem host = new InMemoryHostSystem();
return host;
}
Modified:
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -19,7 +19,7 @@
package org.apache.james.mpt.imapmailbox.jcr;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.jcr.host.JCRHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -42,14 +42,14 @@ import org.apache.james.mailbox.jcr.mail
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.store.JVMMailboxPathLocker;
import org.apache.james.mailbox.store.MockAuthenticator;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
-public class JCRHostSystem extends ImapHostSystem{
+public class JCRHostSystem extends JamesImapHostSystem{
- public static ImapHostSystem build() throws Exception {
+ public static JamesImapHostSystem build() throws Exception {
return new JCRHostSystem();
}
Modified:
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -19,7 +19,7 @@
package org.apache.james.mpt.imapmailbox.jpa;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -49,16 +49,16 @@ import org.apache.james.mailbox.jpa.user
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.store.JVMMailboxPathLocker;
import org.apache.james.mailbox.store.MockAuthenticator;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
import org.apache.openjpa.persistence.OpenJPAPersistence;
import org.slf4j.LoggerFactory;
-public class JPAHostSystem extends ImapHostSystem {
+public class JPAHostSystem extends JamesImapHostSystem {
public static final String META_DATA_DIRECTORY = "target/user-meta-data";
- public static ImapHostSystem build() throws Exception {
+ public static JamesImapHostSystem build() throws Exception {
JPAHostSystem host = new JPAHostSystem();
return host;
}
Modified:
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
Fri Jun 26 16:17:05 2015
@@ -19,7 +19,7 @@
package org.apache.james.mpt.imapmailbox.maildir;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
import com.google.inject.AbstractModule;
Modified:
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java?rev=1687793&r1=1687792&r2=1687793&view=diff
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
(original)
+++
james/mpt/trunk/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
Fri Jun 26 16:17:05 2015
@@ -37,10 +37,10 @@ import org.apache.james.mailbox.store.JV
import org.apache.james.mailbox.store.MockAuthenticator;
import org.apache.james.mailbox.store.StoreMailboxManager;
import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mpt.host.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
-public class MaildirHostSystem extends ImapHostSystem {
+public class MaildirHostSystem extends JamesImapHostSystem {
public static final String META_DATA_DIRECTORY = "target/user-meta-data";
private static final String MAILDIR_HOME = "target/Maildir";
@@ -49,7 +49,7 @@ public class MaildirHostSystem extends I
private final MockAuthenticator userManager;
private final MaildirMailboxSessionMapperFactory
mailboxSessionMapperFactory;
- public static ImapHostSystem build() throws Exception {
+ public static JamesImapHostSystem build() throws Exception {
return new MaildirHostSystem();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]