MockMailRepository.javaAPI DocApache James 2.3.12838Fri Jan 12 12:56:36 GMT 2007org.apache.james.test.mock.james


public class MockMailRepository extends Object implements
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 * * * * 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. *

Fields Summary
private HashMap
Constructors Summary
Methods Summary
public java.util.Iteratorlist()

        return messages.keySet().iterator();  // trivial implementation
public booleanlock(java.lang.String key)

        return false;  // trivial implementation
public voidremove(org.apache.mailet.Mail mail)

public voidremove(java.util.Collection mails)

        for (Iterator i = mails.iterator(); i.hasNext(); ) {
            Mail m = (Mail);
public voidremove(java.lang.String key)

public org.apache.mailet.Mailretrieve(java.lang.String key)

        Mail m2 = new MailImpl((Mail) messages.get(key),key);
        m2.setState(((Mail) messages.get(key)).getState());
        return m2;  // trivial implementation
public voidstore(org.apache.mailet.Mail mc)

        MailImpl m = new MailImpl(mc,mc.getName());
public booleanunlock(java.lang.String key)

        return false;  // trivial implementation