Class AbstractMimeMessage

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage

        javax.mail.internet.MimeMessage.RecipientType
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void buildMessage​(FileInfo fileInfo, ServiceRegistry serviceRegistry)  
      abstract void buildMessageInternal()
      Method must be implemented in subclasses.
      protected void checkParameter​(java.lang.Object parameter, java.lang.String name)
      Method that checks mandatory parameter.
      java.lang.String getEmailBodyText​(ImapService.EmailBodyFormat type)
      Returns the text representing email body for ContentModel node.
      javax.mail.Flags getFlags()
      Returns message flags.
      FileInfo getMessageInfo()
      Returns FileInfo object representing message in Alfresco.
      void setFlags​(javax.mail.Flags flags, boolean value)
      Sets message flags.
      protected void setMessageHeaders()  
      protected void updateMessageID()  
      • Methods inherited from class javax.mail.internet.MimeMessage

        addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateHeaders, writeTo, writeTo
      • Methods inherited from class javax.mail.Message

        addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_RETRIES

        protected static int MAX_RETRIES
      • generateBody

        protected boolean generateBody
      • messageFileInfo

        protected FileInfo messageFileInfo
      • wrappedMessage

        protected javax.mail.internet.MimeMessage wrappedMessage
      • isMessageInSitesLibrary

        protected boolean isMessageInSitesLibrary
    • Constructor Detail

      • AbstractMimeMessage

        protected AbstractMimeMessage​(javax.mail.Session session)
      • AbstractMimeMessage

        protected AbstractMimeMessage​(FileInfo fileInfo,
                                      ServiceRegistry serviceRegistry,
                                      boolean generateBody)
                               throws javax.mail.MessagingException
        Throws:
        javax.mail.MessagingException
    • Method Detail

      • buildMessage

        protected void buildMessage​(FileInfo fileInfo,
                                    ServiceRegistry serviceRegistry)
                             throws javax.mail.MessagingException
        Throws:
        javax.mail.MessagingException
      • buildMessageInternal

        public abstract void buildMessageInternal()
                                           throws javax.mail.MessagingException
        Method must be implemented in subclasses. It usually should be used to generate message body.
        Throws:
        javax.mail.MessagingException
      • checkParameter

        protected void checkParameter​(java.lang.Object parameter,
                                      java.lang.String name)
        Method that checks mandatory parameter.
        Parameters:
        parameter - The parameter instance to check.
        name - The name of the parameter.
      • setMessageHeaders

        protected void setMessageHeaders()
                                  throws javax.mail.MessagingException
        Throws:
        javax.mail.MessagingException
      • getMessageInfo

        public FileInfo getMessageInfo()
        Returns FileInfo object representing message in Alfresco.
        Returns:
        reference to the FileInfo object.
      • getFlags

        public javax.mail.Flags getFlags()
        Returns message flags.
        Overrides:
        getFlags in class javax.mail.internet.MimeMessage
        Returns:
        Flags
      • setFlags

        public void setFlags​(javax.mail.Flags flags,
                             boolean value)
                      throws javax.mail.MessagingException
        Sets message flags.
        Overrides:
        setFlags in class javax.mail.internet.MimeMessage
        Parameters:
        flags - - Flags object.
        value - - flags value.
        Throws:
        javax.mail.MessagingException
      • getEmailBodyText

        public java.lang.String getEmailBodyText​(ImapService.EmailBodyFormat type)
        Returns the text representing email body for ContentModel node.
        Parameters:
        type - The type of the returned body. May be the one of ImapService.EmailBodyFormat.
        Returns:
        Text representing email body for ContentModel node.
      • updateMessageID

        protected void updateMessageID()
                                throws javax.mail.MessagingException
        Overrides:
        updateMessageID in class javax.mail.internet.MimeMessage
        Throws:
        javax.mail.MessagingException