de.saly.javamail.mock2
Class MailboxFolder
java.lang.Object
de.saly.javamail.mock2.MailboxFolder
- All Implemented Interfaces:
- MockMessage.FlagChangeListener
public class MailboxFolder
- extends Object
- implements MockMessage.FlagChangeListener
SEPARATOR
public static final char SEPARATOR
- See Also:
- Constant Field Values
logger
protected final org.slf4j.Logger logger
MailboxFolder
protected MailboxFolder(String name,
MockMailbox mb,
boolean exists)
add
public javax.mail.Message add(javax.mail.internet.MimeMessage e)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
addMailboxEventListener
public void addMailboxEventListener(MailboxFolder.MailboxEventListener l)
addSpecialSubFolder
protected MailboxFolder addSpecialSubFolder(String name)
checkExists
protected void checkExists()
checkFolderName
protected void checkFolderName(String name)
checkFolderName
protected void checkFolderName(String name,
boolean checkSeparator)
create
public MailboxFolder create()
deleteFolder
public void deleteFolder(boolean recurse)
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
expunge
public javax.mail.Message[] expunge()
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
expunge
public javax.mail.Message[] expunge(javax.mail.Message[] msgs)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getByFlags
public javax.mail.Message[] getByFlags(javax.mail.Flags flags,
boolean mustSet)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getById
public javax.mail.Message getById(long id)
getByIds
public javax.mail.Message[] getByIds(long start,
long end)
getByIds
public javax.mail.Message[] getByIds(long[] id)
getByMsgNum
public javax.mail.Message getByMsgNum(int msgnum)
getChildren
public List<MailboxFolder> getChildren()
- Returns:
- Unmodifieable new list copy
getFullName
public String getFullName()
getMailbox
public MockMailbox getMailbox()
- Returns:
- the mailbox
getMessageCount
public int getMessageCount()
getMessages
public javax.mail.Message[] getMessages()
getName
public String getName()
getOrAddSubFolder
public MailboxFolder getOrAddSubFolder(String name)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getParent
public MailboxFolder getParent()
getSizeInBytes
public int getSizeInBytes()
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getUID
public long getUID(javax.mail.Message msg)
getUidValidity
public long getUidValidity()
- Returns:
- the uidValidity
getUniqueMessageId
protected long getUniqueMessageId()
- Returns:
- the uniqueMessageId
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
hasMessages
public boolean hasMessages()
invalidateUid
public void invalidateUid()
isExists
public boolean isExists()
- Returns:
- the exists
isInbox
public boolean isInbox()
isRoot
public boolean isRoot()
isSimulateError
public boolean isSimulateError()
- Returns:
- the simulateError
isSubscribed
protected boolean isSubscribed()
markMessageAsDeleted
public void markMessageAsDeleted(javax.mail.Message e)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
markMessageAsSeen
public void markMessageAsSeen(javax.mail.Message e)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
onFlagChange
public void onFlagChange(MockMessage msg,
javax.mail.Flags flags,
boolean set)
- Specified by:
onFlagChange
in interface MockMessage.FlagChangeListener
removeMailboxEventListener
public void removeMailboxEventListener(MailboxFolder.MailboxEventListener l)
renameFolder
public void renameFolder(String newName)
search
public javax.mail.Message[] search(javax.mail.search.SearchTerm term,
javax.mail.Message[] msgsToSearch)
setSimulateError
public void setSimulateError(boolean simulateError)
- Parameters:
simulateError
- the simulateError to set
setSubscribed
protected void setSubscribed(boolean subscribed)
Copyright © 2014. All rights reserved.