Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

57088: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      56573: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
         56461: MERGE DEV to V4.1-BUG__FIX
           56268 -   MNT-9095 Need to add IMAP mount point unit tests


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61717 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 19:25:17 +00:00
parent 85eae4b91b
commit f4af8ae720
2 changed files with 405 additions and 38 deletions

View File

@@ -117,16 +117,26 @@ public interface ImapService
public void renameMailbox(AlfrescoImapUser user, String oldMailboxName, String newMailboxName);
/**
* Returns a reference to a mailbox, either creating a new one or retrieving an existing one.
* Returns a reference to a mailbox, either creating a new one or retrieving an existing one.<br />
* <br />
* <code>mailbox</code> parameter may specify absolute or relative path to a folder. Absolute path uniquely identifies some directory, whereas relative path implies that root
* folder should be <code>IMAP home</code> directory for the specified <code>user</code> rather than <code>IMAP root</code> (i.e. <code>IMAP mount point</code>). Mailbox will
* be found or created (<code>mayCreate=true<code>, <code>mayExist=false<code> or ) in <code>user<code>'s <code>IMAP home</code> directory if relative path is specified.<br />
* <br />
* <code>mayExist</code> and mayCreate parameters' combinations and results:
* <ul>
* <li><code>mayCreate=false</code>, <code>mayExist=true</code> - mailbox is found and not created if it doesn't exist. Error is thrown if mailbox doesn't not exist;</li>
* <li><code>mayCreate=true</code>, <code>mayExist=true</code> - mailbox is created if it doesn't exist or it is just found in other case. No error is thrown;</li>
* <li><code>mayCreate=true</code>, <code>mayExist=false</code> - mailbox is created if it doesn't exist. Error is thrown if it is already created;</li>
* <li><code>mayCreate=false</code>, <code>mayExist=false</code> - error is thrown that mailbox cannot be created if doesn't exist. Error is thrown that mailbox should not
* exist in other case.<br />
* <b>It's a very shady combination!</b></li>
* </ul>
*
* @param user
* User making the request.
* @param mailboxName
* String name of the target.
* @param mayExist
* Is the mailbox allowed to exist already? If <code>false</code> and the mailbox already exists, an error will be thrown
* @param mayCreate
* If the mailbox does not exist, can one be created? If <code>false</code> then an error is thrown if the folder does not exist
* @param user User making the request.
* @param mailboxName String name of the target.
* @param mayExist Is the mailbox allowed to exist already? If <code>false</code> and the mailbox already exists, an error will be thrown
* @param mayCreate If the mailbox does not exist, can one be created? If <code>false</code> then an error is thrown if the folder does not exist
* @return a Mailbox reference
*/
public AlfrescoImapFolder getOrCreateMailbox(AlfrescoImapUser user, String mailboxName, boolean mayExist, boolean mayCreate);