Class MockFolder

  • All Implemented Interfaces:
    AutoCloseable

    public class MockFolder
    extends jakarta.mail.Folder
    Author:
    Kohsuke Kawaguchi
    • Field Summary

      • Fields inherited from class jakarta.mail.Folder

        HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendMessages​(jakarta.mail.Message[] msgs)  
      void close​(boolean expunge)  
      boolean create​(int type)  
      boolean delete​(boolean recurse)  
      boolean exists()  
      jakarta.mail.Message[] expunge()  
      jakarta.mail.Folder getFolder​(String name)  
      String getFullName()  
      jakarta.mail.Message getMessage​(int msgnum)  
      int getMessageCount()  
      jakarta.mail.Message[] getMessages​(int low, int high)  
      String getName()  
      int getNewMessageCount()  
      jakarta.mail.Folder getParent()  
      jakarta.mail.Flags getPermanentFlags()  
      char getSeparator()  
      int getType()  
      boolean hasNewMessages()  
      boolean isOpen()  
      jakarta.mail.Folder[] list​(String pattern)  
      void open​(int mode)  
      boolean renameTo​(jakarta.mail.Folder f)  
      • Methods inherited from class jakarta.mail.Folder

        addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, close, copyMessages, fetch, finalize, getDeletedMessageCount, getMessages, getMessages, getMode, getStore, getUnreadMessageCount, getURLName, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in class jakarta.mail.Folder
      • getFullName

        public String getFullName()
        Specified by:
        getFullName in class jakarta.mail.Folder
      • getParent

        public jakarta.mail.Folder getParent()
                                      throws jakarta.mail.MessagingException
        Specified by:
        getParent in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • exists

        public boolean exists()
                       throws jakarta.mail.MessagingException
        Specified by:
        exists in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • list

        public jakarta.mail.Folder[] list​(String pattern)
                                   throws jakarta.mail.MessagingException
        Specified by:
        list in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getSeparator

        public char getSeparator()
                          throws jakarta.mail.MessagingException
        Specified by:
        getSeparator in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getType

        public int getType()
                    throws jakarta.mail.MessagingException
        Specified by:
        getType in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • create

        public boolean create​(int type)
                       throws jakarta.mail.MessagingException
        Specified by:
        create in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • hasNewMessages

        public boolean hasNewMessages()
                               throws jakarta.mail.MessagingException
        Specified by:
        hasNewMessages in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getFolder

        public jakarta.mail.Folder getFolder​(String name)
                                      throws jakarta.mail.MessagingException
        Specified by:
        getFolder in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • delete

        public boolean delete​(boolean recurse)
                       throws jakarta.mail.MessagingException
        Specified by:
        delete in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • renameTo

        public boolean renameTo​(jakarta.mail.Folder f)
                         throws jakarta.mail.MessagingException
        Specified by:
        renameTo in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • open

        public void open​(int mode)
                  throws jakarta.mail.MessagingException
        Specified by:
        open in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • close

        public void close​(boolean expunge)
                   throws jakarta.mail.MessagingException
        Specified by:
        close in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in class jakarta.mail.Folder
      • getPermanentFlags

        public jakarta.mail.Flags getPermanentFlags()
        Specified by:
        getPermanentFlags in class jakarta.mail.Folder
      • getMessageCount

        public int getMessageCount()
                            throws jakarta.mail.MessagingException
        Specified by:
        getMessageCount in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getNewMessageCount

        public int getNewMessageCount()
                               throws jakarta.mail.MessagingException
        Overrides:
        getNewMessageCount in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getMessage

        public jakarta.mail.Message getMessage​(int msgnum)
                                        throws jakarta.mail.MessagingException
        Specified by:
        getMessage in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • getMessages

        public jakarta.mail.Message[] getMessages​(int low,
                                                  int high)
                                           throws jakarta.mail.MessagingException
        Overrides:
        getMessages in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • appendMessages

        public void appendMessages​(jakarta.mail.Message[] msgs)
                            throws jakarta.mail.MessagingException
        Specified by:
        appendMessages in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException
      • expunge

        public jakarta.mail.Message[] expunge()
                                       throws jakarta.mail.MessagingException
        Specified by:
        expunge in class jakarta.mail.Folder
        Throws:
        jakarta.mail.MessagingException