Class GmailFolder

All Implemented Interfaces:
UIDFolder, AutoCloseable, org.eclipse.angus.mail.iap.ResponseHandler

public class GmailFolder extends IMAPFolder
A Gmail folder. Defines new FetchProfile items and uses GmailMessage to store additional Gmail message attributes.
Since:
JavaMail 1.4.6
  • Constructor Details

    • GmailFolder

      protected GmailFolder(String fullName, char separator, IMAPStore store, Boolean isNamespace)
      Constructor used to create a possibly non-existent folder.
      Parameters:
      fullName - fullname of this folder
      separator - the default separator character for this folder's namespace
      store - the Store
      isNamespace - does this name represent a namespace?
    • GmailFolder

      protected GmailFolder(org.eclipse.angus.mail.imap.protocol.ListInfo li, IMAPStore store)
      Constructor used to create an existing folder.
      Parameters:
      li - the ListInfo for this folder
      store - the store containing this folder
  • Method Details

    • setLabels

      public void setLabels(Message[] msgs, String[] labels, boolean set) throws MessagingException
      Set the specified labels for the given array of messages.
      Parameters:
      msgs - the messages
      labels - the labels to add or remove
      set - true to add, false to remove
      Throws:
      MessagingException - for failures
      Since:
      JavaMail 1.5.5
    • setLabels

      public void setLabels(int start, int end, String[] labels, boolean set) throws MessagingException
      Set the specified labels for the given range of message numbers.
      Parameters:
      start - first message number
      end - last message number
      labels - the labels to add or remove
      set - true to add, false to remove
      Throws:
      MessagingException - for failures
      Since:
      JavaMail 1.5.5
    • setLabels

      public void setLabels(int[] msgnums, String[] labels, boolean set) throws MessagingException
      Set the specified labels for the given array of message numbers.
      Parameters:
      msgnums - the message numbers
      labels - the labels to add or remove
      set - true to add, false to remove
      Throws:
      MessagingException - for failures
      Since:
      JavaMail 1.5.5
    • newIMAPMessage

      protected IMAPMessage newIMAPMessage(int msgnum)
      Create a new IMAPMessage object to represent the given message number.
      Overrides:
      newIMAPMessage in class IMAPFolder
      Parameters:
      msgnum - the message sequence number
      Returns:
      the new IMAPMessage object