Package org.alfresco.email
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>
-
Field Summary
Fields inherited from class org.alfresco.utility.dsl.DSLWrapper
contentService, dataContent, jmxBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to delete an open folder Note: this will always fail since a folder must be closed in order to be deletedauthenticateUser(org.alfresco.utility.model.UserModel userModel) authenticateUser(org.alfresco.utility.model.UserModel userModel, int port) authenticateUser(org.alfresco.utility.model.UserModel userModel, String host) authenticateUser(org.alfresco.utility.model.UserModel userModel, String host, int port) copyMessagesTo(org.alfresco.utility.model.ContentModel destinationContentModel) Copy all messages from current folder to destination foldercopyMessageTo(org.alfresco.utility.model.ContentModel destinationContentModel) copyTo(org.alfresco.utility.model.ContentModel destination) createFolder(org.alfresco.utility.model.FolderModel folderModel) delete()Delete the folder.Delete current message.deleteMessage(String... contentNames) Delete specified message(s) (content) by given name.List<org.alfresco.utility.model.FolderModel>javax.mail.Storeprotected StringmoveMessageTo(org.alfresco.utility.model.ContentModel destinationContentModel) Move all messages from current folder to destination foldermoveTo(org.alfresco.utility.model.ContentModel destination) renameMessageTo(org.alfresco.utility.model.ContentModel newContent) Rename message to the name of new contentsearchSubjectFor(String searchedTerm) Search subject message for searched termsearchSubjectWithWildcardsFor(String searchedTerm) Search subject message for searched term that can contains wild cardsSubscribe the current folderUnsubscribe the current folderusingResource(org.alfresco.utility.model.ContentModel contentModel) List<javax.mail.Message>Gets all search resultsusingSite(org.alfresco.utility.model.SiteModel siteModel) usingSiteCalendarContainer(org.alfresco.utility.model.SiteModel siteModel) usingSiteLinksContainer(org.alfresco.utility.model.SiteModel siteModel) usingSiteRoot(org.alfresco.utility.model.SiteModel siteModel) Set the currentSpace to /Sites/siteIdusingSiteWikiContainer(org.alfresco.utility.model.SiteModel siteModel) usingUserHome(String username) withJMX()Starts process of working with message flags of current content (file)Methods inherited from class org.alfresco.utility.dsl.DSLProtocol
and, buildPath, buildSiteDocumentLibraryPath, buildUserHomePath, closeJmxConnection, getCurrentSpace, getCurrentUser, getLastContentModel, getLastResource, getLastResourceWithoutPrefix, getProtocolName, isProtocolEnabled, setCurrentSpace, setLastContentModel, setLastResource, then, usingAdmin, usingRoot, usingUser, waitSeconds, whenMethods inherited from class org.alfresco.utility.dsl.DSLWrapper
getDataContentService, getTestUser, setTestUser
-
Constructor Details
-
ImapWrapper
public ImapWrapper()
-
-
Method Details
-
getImapStore
public javax.mail.Store getImapStore() -
assertThat
- Overrides:
assertThatin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
-
withJMX
- Returns:
- JMX DSL for this wrapper
-
withImapUtil
- Returns:
- utilities that are used by CMIS
-
authenticateUser
public ImapWrapper authenticateUser(org.alfresco.utility.model.UserModel userModel) throws Exception - Specified by:
authenticateUserin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
disconnect
- Specified by:
disconnectin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
getPrefixSpace
- Specified by:
getPrefixSpacein classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>
-
getRootPath
- Specified by:
getRootPathin interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
getRootPathin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getSitesPath
- Specified by:
getSitesPathin interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
getSitesPathin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getUserHomesPath
- Specified by:
getUserHomesPathin interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
getUserHomesPathin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getDataDictionaryPath
public String getDataDictionaryPath() throws org.alfresco.utility.exception.TestConfigurationException- Specified by:
getDataDictionaryPathin interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
getDataDictionaryPathin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
org.alfresco.utility.exception.TestConfigurationException
-
getProtocolJMXConfigurationStatus
- Specified by:
getProtocolJMXConfigurationStatusin classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
usingDataDictionary
- Throws:
Exception
-
usingPath
- Throws:
Exception
-
usingSites
- Throws:
Exception
-
usingSite
- Specified by:
usingSitein interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
usingSitein classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
usingUserHome
- Specified by:
usingUserHomein interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
usingUserHomein classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
usingUserHome
- Specified by:
usingUserHomein interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
usingUserHomein classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
usingUserHomeRoot
- Throws:
Exception
-
usingAlfrescoImap
- 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:
createFolderin interfaceorg.alfresco.utility.dsl.DSLFolder<ImapWrapper>- Throws:
Exception
-
delete
Delete the folder. Folder must be closed in order to be deleted.- Specified by:
deletein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>- Throws:
Exception
-
attemptToDeleteOpenFolder
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
- Specified by:
getFoldersin interfaceorg.alfresco.utility.dsl.DSLFolder<ImapWrapper>- Throws:
Exception
-
rename
- Specified by:
renamein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>- Throws:
Exception
-
update
- Specified by:
updatein interfaceorg.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>- Throws:
Exception
-
copyTo
- Specified by:
copyToin interfaceorg.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>- Throws:
Exception
-
moveTo
- Specified by:
moveToin interfaceorg.alfresco.utility.dsl.DSLContentModelAction<ImapWrapper>- Throws:
Exception
-
deleteMessage
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
Delete current message. Parent folder must be closed at the end in order message to be deleted.- Returns:
- current wrapper
- Throws:
Exception
-
usingSite
- Specified by:
usingSitein interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
usingSitein classorg.alfresco.utility.dsl.DSLProtocol<ImapWrapper>- Throws:
Exception
-
usingResource
public ImapWrapper usingResource(org.alfresco.utility.model.ContentModel contentModel) throws Exception - Specified by:
usingResourcein interfaceorg.alfresco.utility.dsl.DSL<ImapWrapper>- Specified by:
usingResourcein classorg.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
Starts process of working with message flags of current content (file)- Returns:
- Throws:
Exception
-
searchSubjectWithWildcardsFor
Search subject message for searched term that can contains wild cards- Parameters:
searchedTerm-- Returns:
- Throws:
Exception
-
searchSubjectFor
Search subject message for searched term- Parameters:
searchedTerm-- Returns:
- Throws:
Exception
-
usingSearchResults
Gets all search results- Returns:
- list of returned messaged by searched
-
subscribe
Subscribe the current folder- Returns:
- Throws:
Exception
-
unsubscribe
Unsubscribe the current folder- Returns:
- Throws:
Exception
-
usingSiteRoot
Set the currentSpace to /Sites/siteId- Throws:
Exception
-