1 /*****************************************************************
2 * Licensed to the Apache Software Foundation (ASF) under one *
3 * or more contributor license agreements. See the NOTICE file *
4 * distributed with this work for additional information *
5 * regarding copyright ownership. The ASF licenses this file *
6 * to you under the Apache License, Version 2.0 (the *
7 * "License"); you may not use this file except in compliance *
8 * with the License. You may obtain a copy of the License at *
9 * *
10 * http://www.apache.org/licenses/LICENSE-2.0 *
11 * *
12 * Unless required by applicable law or agreed to in writing, *
13 * software distributed under the License is distributed on an *
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
15 * KIND, either express or implied. See the License for the *
16 * specific language governing permissions and limitations *
17 * under the License. *
18 ****************************************************************/
19 package org.apache.james.test.mock.james;
20
21 import org.apache.james.services.SpoolRepository;
22 import org.apache.mailet.Mail;
23
24 import javax.mail.MessagingException;
25
26 import java.util.ArrayList;
27 import java.util.Collection;
28 import java.util.Iterator;
29
30 public class MockSpoolRepository implements SpoolRepository {
31 public ArrayList storedMails = new ArrayList();
32
33 public Mail accept() throws InterruptedException {
34
35 return null;
36 }
37
38 public Mail accept(long delay) throws InterruptedException {
39
40 return null;
41 }
42
43 public Mail accept(AcceptFilter filter) throws InterruptedException {
44
45 return null;
46 }
47
48 public void store(Mail mc) throws MessagingException {
49
50 }
51
52 public Iterator list() throws MessagingException {
53
54 return null;
55 }
56
57 public Mail retrieve(String key) throws MessagingException {
58
59 return null;
60 }
61
62 public void remove(Mail mail) throws MessagingException {
63
64
65 }
66
67 public void remove(Collection mails) throws MessagingException {
68
69
70 }
71
72 public void remove(String key) throws MessagingException {
73
74
75 }
76
77 public boolean lock(String key) throws MessagingException {
78
79 return false;
80 }
81
82 public boolean unlock(String key) throws MessagingException {
83
84 return false;
85 }
86 }