Class MetaMessage

    • Constructor Detail

      • MetaMessage

        public MetaMessage​(int messageNumber,
                           MetaFolder folder,
                           org.jdom.Namespace namespace)
        Constructs a new meta message instance based on a new JDOM element with the specified message id.
        Parameters:
        messageId - the message id of the new meta message
      • MetaMessage

        public MetaMessage​(org.jdom.Element element,
                           MetaFolder folder,
                           org.jdom.Namespace namespace)
        Constructs a new meta message instance based on the specified JDOM element.
        Parameters:
        element - a JDOM element for the meta message
    • Method Detail

      • getElement

        protected final org.jdom.Element getElement()
        Returns the underlying JDOM element.
        Returns:
        a JDOM element
      • getMessageNumber

        public final int getMessageNumber()
        Returns the 1-based number of the message the delegate is associated with. If a message number is not set it is assumed the message does not belong to a folder and thus has a message number of zero (0).
        Returns:
        the message number associated with this delegate, or zero if no message number is identified
      • getReceived

        public final Date getReceived()
        Returns:
        Returns the received.
      • setReceived

        public final void setReceived​(Date date)
        Parameters:
        date - The received to set.
      • getForwarded

        public final Date getForwarded()
        Returns:
        Returns the forwarded.
      • setForwarded

        public final void setForwarded​(Date date)
        Parameters:
        date - The forwarded to set.
      • getReplied

        public final Date getReplied()
        Returns:
        Returns the replied.
      • setReplied

        public final void setReplied​(Date date)
        Parameters:
        date - The replied to set.
      • isExpunged

        public final boolean isExpunged()
        Returns:
        Returns the expunged.
      • setExpunged

        public final void setExpunged​(boolean flag)
        Parameters:
        flag - The expunged to set.
      • getFlags

        public final javax.mail.Flags getFlags()
        Returns:
        Returns the flags.
      • setFlags

        public final void setFlags​(javax.mail.Flags flags)
        Parameters:
        flags - The flags to set.
      • getHeaders

        public final javax.mail.internet.InternetHeaders getHeaders()
        Returns:
        headers saved in delegate
      • setHeaders

        public final void setHeaders​(Enumeration<javax.mail.Header> headers)
        Parameters:
        headers - an enumeration of headers to attach to the message
      • saveChanges

        public void saveChanges()
                         throws DelegateException
        Persist unsaved changes.
        Throws:
        DelegateException - where an error occurs saving changes in the message
      • getUid

        public long getUid()
        Returns the UID associated with the message.
        Returns:
        a long representation of a UID, or -1 if no UID is assigned
      • setUid

        public void setUid​(long uid)
        Sets the UID associated with the message.
        Parameters:
        uid - a UID value to associate with the message
      • getInputStream

        public InputStream getInputStream()
        Returns:
        an input stream for message data