com.emarsys.ecommon.mail.mock
Class MockFolder
java.lang.Object
javax.mail.Folder
com.emarsys.ecommon.mail.mock.MockFolder
- Direct Known Subclasses:
- PopMockFolder
public class MockFolder
- extends javax.mail.Folder
A Folder
backed by a MockMailbox
.
- Author:
- Michael "kULO" Kulovits
Fields inherited from class javax.mail.Folder |
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
Methods inherited from class javax.mail.Folder |
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, fetch, finalize, getDeletedMessageCount, getMessages, getMessages, getMessages, getMode, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
mailbox
protected final MockMailbox mailbox
open
protected boolean open
MockFolder
public MockFolder(MockStore store,
MockMailbox mailbox,
java.lang.String name)
- Parameters:
store
- mailbox
-
getInstance
public static MockFolder getInstance(MockStore store,
MockMailbox mailbox,
java.lang.String name)
getMailboxFolder
protected java.util.List<javax.mail.Message> getMailboxFolder()
- Returns:
getName
public java.lang.String getName()
- Specified by:
getName
in class javax.mail.Folder
- See Also:
Folder.getName()
getFullName
public java.lang.String getFullName()
- Specified by:
getFullName
in class javax.mail.Folder
- See Also:
Folder.getFullName()
getParent
public javax.mail.Folder getParent()
throws javax.mail.MessagingException
- Specified by:
getParent
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getParent()
exists
public boolean exists()
throws javax.mail.MessagingException
- Specified by:
exists
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.exists()
list
public javax.mail.Folder[] list(java.lang.String pattern)
throws javax.mail.MessagingException
- Specified by:
list
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.list(java.lang.String)
getSeparator
public char getSeparator()
throws javax.mail.MessagingException
- Specified by:
getSeparator
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getSeparator()
getType
public int getType()
throws javax.mail.MessagingException
- Specified by:
getType
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getType()
create
public boolean create(int type)
throws javax.mail.MessagingException
- Specified by:
create
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.create(int)
hasNewMessages
public boolean hasNewMessages()
throws javax.mail.MessagingException
- Specified by:
hasNewMessages
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.hasNewMessages()
getFolder
public javax.mail.Folder getFolder(java.lang.String name)
throws javax.mail.MessagingException
- Specified by:
getFolder
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getFolder(java.lang.String)
delete
public boolean delete(boolean recurse)
throws javax.mail.MessagingException
- Specified by:
delete
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.delete(boolean)
renameTo
public boolean renameTo(javax.mail.Folder f)
throws javax.mail.MessagingException
- Specified by:
renameTo
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.renameTo(javax.mail.Folder)
open
public void open(int mode)
throws javax.mail.MessagingException
- Specified by:
open
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.open(int)
close
public void close(boolean expunge)
throws javax.mail.MessagingException
- Specified by:
close
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.close(boolean)
isOpen
public boolean isOpen()
- Specified by:
isOpen
in class javax.mail.Folder
- See Also:
Folder.isOpen()
getPermanentFlags
public javax.mail.Flags getPermanentFlags()
- Specified by:
getPermanentFlags
in class javax.mail.Folder
- See Also:
Folder.getPermanentFlags()
getMessageCount
public int getMessageCount()
throws javax.mail.MessagingException
- Specified by:
getMessageCount
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getMessageCount()
getMessage
public javax.mail.Message getMessage(int index)
throws javax.mail.MessagingException
- Specified by:
getMessage
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.getMessage(int)
appendMessages
public void appendMessages(javax.mail.Message[] msgs)
throws javax.mail.MessagingException
- Specified by:
appendMessages
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.appendMessages(javax.mail.Message[])
expunge
public javax.mail.Message[] expunge()
throws javax.mail.MessagingException
- Specified by:
expunge
in class javax.mail.Folder
- Throws:
javax.mail.MessagingException
- See Also:
Folder.expunge()
doExpunge
protected javax.mail.Message[] doExpunge()
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
Copyright © 2010 emarsys AG. All Rights Reserved.