Class ImapUtil


  • public class ImapUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ImapUtil​(ImapWrapper imapProtocol)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.mail.Folder getCurrentFolder()  
      java.lang.String getCurrentSiteName()  
      javax.mail.Folder getFolder​(org.alfresco.utility.model.ContentModel contentModel)
      Returns IMAP folder for the provided ContentModel
      javax.mail.Message getMessageBySubject​(javax.mail.Message[] messages, java.lang.String subject)
      Returns message if it exists otherwise returns null
      protected java.lang.String getMessageContent​(javax.mail.Message message)
      Returns multipart message content as text
      java.lang.String getMessageFlagName​(javax.mail.Flags.Flag flag)  
      java.lang.String getObjectName​(java.lang.String path)
      Returns the object name e.g.
      • Methods inherited from class java.lang.Object

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

      • ImapUtil

        public ImapUtil​(ImapWrapper imapProtocol)
    • Method Detail

      • getCurrentFolder

        public javax.mail.Folder getCurrentFolder()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFolder

        public javax.mail.Folder getFolder​(org.alfresco.utility.model.ContentModel contentModel)
                                    throws java.lang.Exception
        Returns IMAP folder for the provided ContentModel
        Throws:
        java.lang.Exception
      • getMessageBySubject

        public javax.mail.Message getMessageBySubject​(javax.mail.Message[] messages,
                                                      java.lang.String subject)
                                               throws java.lang.Exception
        Returns message if it exists otherwise returns null
        Throws:
        java.lang.Exception
      • getMessageContent

        protected java.lang.String getMessageContent​(javax.mail.Message message)
                                              throws java.lang.Exception
        Returns multipart message content as text
        Throws:
        java.lang.Exception
      • getObjectName

        public java.lang.String getObjectName​(java.lang.String path)
        Returns the object name e.g. getObjectName("/documentLibrary/file.txt") will return file.txt
      • getCurrentSiteName

        public java.lang.String getCurrentSiteName()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMessageFlagName

        public java.lang.String getMessageFlagName​(javax.mail.Flags.Flag flag)