Class ImapWrapper

java.lang.Object
org.alfresco.utility.dsl.DSLWrapper<Client>
org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
org.alfresco.email.ImapWrapper
All Implemented Interfaces:
org.alfresco.utility.dsl.DSL<ImapWrapper>, org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>, org.alfresco.utility.dsl.DSLFolder<ImapWrapper>

@Service @Scope("prototype") public class ImapWrapper extends org.alfresco.utility.dsl.DSLProtocol<ImapWrapper> implements org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>, org.alfresco.utility.dsl.DSLFolder<ImapWrapper>
  • Constructor Details

    • ImapWrapper

      public ImapWrapper()
  • Method Details

    • getImapStore

      public javax.mail.Store getImapStore()
    • assertThat

      public ImapAssertion assertThat()
      Overrides:
      assertThat in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
    • withJMX

      public JmxUtil withJMX()
      Returns:
      JMX DSL for this wrapper
    • withImapUtil

      public ImapUtil withImapUtil()
      Returns:
      utilities that are used by CMIS
    • authenticateUser

      public ImapWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel) throws Exception
      Specified by:
      authenticateUser in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • disconnect

      public ImapWrapper disconnect() throws Exception
      Specified by:
      disconnect in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • getPrefixSpace

      public String getPrefixSpace()
      Specified by:
      getPrefixSpace in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
    • getRootPath

      public String getRootPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getRootPath in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      getRootPath in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getSitesPath

      public String getSitesPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getSitesPath in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      getSitesPath in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getUserHomesPath

      public String getUserHomesPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getUserHomesPath in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      getUserHomesPath in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getDataDictionaryPath

      public String getDataDictionaryPath() throws org.alfresco.utility.exception.TestConfigurationException
      Specified by:
      getDataDictionaryPath in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      getDataDictionaryPath in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • getProtocolJMXConfigurationStatus

      protected String getProtocolJMXConfigurationStatus() throws Exception
      Specified by:
      getProtocolJMXConfigurationStatus in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • usingDataDictionary

      public ImapWrapper usingDataDictionary() throws Exception
      Throws:
      Exception
    • usingPath

      public ImapWrapper usingPath(String path) throws Exception
      Throws:
      Exception
    • usingSites

      public ImapWrapper usingSites() throws Exception
      Throws:
      Exception
    • usingSite

      public ImapWrapper usingSite(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Specified by:
      usingSite in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      usingSite in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • usingUserHome

      public ImapWrapper usingUserHome(String username) throws Exception
      Specified by:
      usingUserHome in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      usingUserHome in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • usingUserHome

      public ImapWrapper usingUserHome() throws Exception
      Specified by:
      usingUserHome in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      usingUserHome in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • usingUserHomeRoot

      public ImapWrapper usingUserHomeRoot() throws Exception
      Throws:
      Exception
    • usingAlfrescoImap

      public ImapWrapper usingAlfrescoImap() throws Exception
      Throws:
      Exception
    • usingSiteWikiContainer

      public ImapWrapper usingSiteWikiContainer(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Throws:
      Exception
    • usingSiteLinksContainer

      public ImapWrapper usingSiteLinksContainer(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Throws:
      Exception
    • usingSiteCalendarContainer

      public ImapWrapper usingSiteCalendarContainer(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Throws:
      Exception
    • createFolder

      public ImapWrapper createFolder(org.alfresco.utility.model.FolderModel folderModel) throws Exception
      Specified by:
      createFolder in interface org.alfresco.utility.dsl.DSLFolder<ImapWrapper>
      Throws:
      Exception
    • delete

      public ImapWrapper delete() throws Exception
      Delete the folder. Folder must be closed in order to be deleted.
      Specified by:
      delete in interface org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>
      Throws:
      Exception
    • attemptToDeleteOpenFolder

      public ImapWrapper attemptToDeleteOpenFolder() throws Exception
      Attempts to delete an open folder Note: this will always fail since a folder must be closed in order to be deleted
      Throws:
      Exception
    • getFolders

      public List<org.alfresco.utility.model.FolderModel> getFolders() throws Exception
      Specified by:
      getFolders in interface org.alfresco.utility.dsl.DSLFolder<ImapWrapper>
      Throws:
      Exception
    • rename

      public ImapWrapper rename(String newName) throws Exception
      Specified by:
      rename in interface org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>
      Throws:
      Exception
    • update

      public ImapWrapper update(String content) throws Exception
      Specified by:
      update in interface org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>
      Throws:
      Exception
    • copyTo

      public ImapWrapper copyTo(org.alfresco.utility.model.ContentModel destination) throws Exception
      Specified by:
      copyTo in interface org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>
      Throws:
      Exception
    • moveTo

      public ImapWrapper moveTo(org.alfresco.utility.model.ContentModel destination) throws Exception
      Specified by:
      moveTo in interface org.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>
      Throws:
      Exception
    • deleteMessage

      public ImapWrapper deleteMessage(String... contentNames) throws Exception
      Delete specified message(s) (content) by given name. A message in IMAP client can be identified by the name of the content. Parent folder must be closed at the end in order message to be deleted.
      Parameters:
      contentNames - name of the content(s)
      Returns:
      current wrapper
      Throws:
      Exception
    • deleteMessage

      public ImapWrapper deleteMessage() throws Exception
      Delete current message. Parent folder must be closed at the end in order message to be deleted.
      Returns:
      current wrapper
      Throws:
      Exception
    • usingSite

      public ImapWrapper usingSite(String siteId) throws Exception
      Specified by:
      usingSite in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      usingSite in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • usingResource

      public ImapWrapper usingResource(org.alfresco.utility.model.ContentModel contentModel) throws Exception
      Specified by:
      usingResource in interface org.alfresco.utility.dsl.DSL<ImapWrapper>
      Specified by:
      usingResource in class org.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
      Throws:
      Exception
    • copyMessageTo

      public ImapWrapper copyMessageTo(org.alfresco.utility.model.ContentModel destinationContentModel) throws Exception
      Throws:
      Exception
    • copyMessagesTo

      public ImapWrapper copyMessagesTo(org.alfresco.utility.model.ContentModel destinationContentModel) throws Exception
      Copy all messages from current folder to destination folder
      Parameters:
      destinationContentModel - destination folder
      Returns:
      Throws:
      Exception
    • renameMessageTo

      public ImapWrapper renameMessageTo(org.alfresco.utility.model.ContentModel newContent) throws Exception
      Rename message to the name of new content
      Parameters:
      newContent -
      Returns:
      Throws:
      Exception
    • moveMessageTo

      public ImapWrapper moveMessageTo(org.alfresco.utility.model.ContentModel destinationContentModel) throws Exception
      Move all messages from current folder to destination folder
      Parameters:
      destinationContentModel - destination folder
      Returns:
      Throws:
      Exception
    • authenticateUser

      public ImapWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel, String host) throws Exception
      Throws:
      Exception
    • authenticateUser

      public ImapWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel, int port) throws Exception
      Throws:
      Exception
    • authenticateUser

      public ImapWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel, String host, int port) throws Exception
      Throws:
      Exception
    • withMessage

      public MessageFlags withMessage() throws Exception
      Starts process of working with message flags of current content (file)
      Returns:
      Throws:
      Exception
    • searchSubjectWithWildcardsFor

      public ImapWrapper searchSubjectWithWildcardsFor(String searchedTerm) throws Exception
      Search subject message for searched term that can contains wild cards
      Parameters:
      searchedTerm -
      Returns:
      Throws:
      Exception
    • searchSubjectFor

      public ImapWrapper searchSubjectFor(String searchedTerm) throws Exception
      Search subject message for searched term
      Parameters:
      searchedTerm -
      Returns:
      Throws:
      Exception
    • usingSearchResults

      public List<javax.mail.Message> usingSearchResults()
      Gets all search results
      Returns:
      list of returned messaged by searched
    • subscribe

      public ImapWrapper subscribe() throws Exception
      Subscribe the current folder
      Returns:
      Throws:
      Exception
    • unsubscribe

      public ImapWrapper unsubscribe() throws Exception
      Unsubscribe the current folder
      Returns:
      Throws:
      Exception
    • usingSiteRoot

      public ImapWrapper usingSiteRoot(org.alfresco.utility.model.SiteModel siteModel) throws Exception
      Set the currentSpace to /Sites/siteId
      Throws:
      Exception