1 19 20 21 22 package org.apache.james.test.mock.james; 23 24 import java.util.HashMap ; 25 import java.util.Iterator ; 26 27 import org.apache.james.services.VirtualUserTable; 28 import org.apache.james.services.VirtualUserTableStore; 29 30 public class MockVirtualUserTableStore implements VirtualUserTableStore { 31 HashMap tableStore = new HashMap (); 32 33 public VirtualUserTable getTable(String name) { 34 return (VirtualUserTable) tableStore.get(name); 35 } 36 37 public Iterator getTableNames() { 38 return tableStore.keySet().iterator(); 39 } 40 41 public void addTable(String tableName) { 42 tableStore.put(tableName, new MockVirtualUserTableManagementImpl()); 43 } 44 45 public void removeTable(String tableName) { 46 tableStore.remove(tableName); 47 } 48 49 } 50 | Popular Tags |