mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
107541: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud) (PARTIAL MERGE) 107413: Merged DEV to 5.0.N (5.0.3) 106858 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code - Cleaning of Javadoc, 107565: MNT-13545 Fix compilation after merge of Javadoc git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@107633 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -60,14 +60,14 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
{
|
||||
this.serviceRegistry = serviceRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that checks mandatory parameter.
|
||||
* @param parameter The parameter instance to check.
|
||||
* @param name The name of the parameter.
|
||||
*/
|
||||
protected void checkParameter(Object parameter, String name)
|
||||
{
|
||||
|
||||
/**
|
||||
* Method that checks mandatory parameter.
|
||||
* @param parameter The parameter instance to check.
|
||||
* @param name The name of the parameter.
|
||||
*/
|
||||
protected void checkParameter(Object parameter, String name)
|
||||
{
|
||||
if (parameter == null)
|
||||
{
|
||||
throw new IllegalArgumentException(name + " parameter is null.");
|
||||
@@ -81,7 +81,7 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
* @param message - message.
|
||||
* @param flags - message flags.
|
||||
* @param internalDate - not used. Current date used instead.
|
||||
* @return
|
||||
* @return long
|
||||
*/
|
||||
public long appendMessage(final MimeMessage message, final Flags flags, final Date internalDate) throws FolderException
|
||||
{
|
||||
@@ -127,7 +127,7 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all messages in the folder as deleted using {@link Flags.Flag#DELETED} flag.
|
||||
* Marks all messages in the folder as deleted using {@link javax.mail.Flags.Flag#DELETED} flag.
|
||||
*/
|
||||
public void deleteAllMessages() throws FolderException
|
||||
{
|
||||
@@ -145,7 +145,7 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
|
||||
|
||||
/**
|
||||
* Deletes messages marked with {@link Flags.Flag#DELETED}. Note that this message deletes all messages with this flag.
|
||||
* Deletes messages marked with {@link javax.mail.Flags.Flag#DELETED}. Note that this message deletes all messages with this flag.
|
||||
*/
|
||||
public void expunge() throws FolderException
|
||||
{
|
||||
@@ -165,7 +165,7 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes messages marked with {@link Flags.Flag#DELETED}. Note that this message deletes the messages with current uid
|
||||
* Deletes messages marked with {@link javax.mail.Flags.Flag#DELETED}. Note that this message deletes the messages with current uid
|
||||
*/
|
||||
public void expunge(final long uid) throws FolderException
|
||||
{
|
||||
@@ -238,7 +238,7 @@ public abstract class AbstractImapFolder implements MailFolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of messages that have no {@link Flags.Flag#DELETED} flag set for current user.
|
||||
* Returns the list of messages that have no {@link javax.mail.Flags.Flag#DELETED} flag set for current user.
|
||||
*
|
||||
* @return the list of non-deleted messages.
|
||||
*/
|
||||
|
@@ -138,21 +138,21 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs {@link AlfrescoImapFolder} object.
|
||||
*
|
||||
* @param folderInfo - reference to the {@link FileInfo} object representing the folder.
|
||||
* @param userName - name of user (e.g. "admin" for admin user).
|
||||
* @param folderName - name of the folder.
|
||||
* @param folderPath - path of the folder.
|
||||
* @param viewMode - defines view mode. Can be one of the following: {@link ImapViewMode#ARCHIVE} or {@link ImapViewMode#VIRTUAL}.
|
||||
* @param extractAttachmentsEnabled
|
||||
* @param imapService
|
||||
* @param serviceRegistry
|
||||
* @param mountPointId - id of the mount point.
|
||||
*/
|
||||
public AlfrescoImapFolder(
|
||||
FileInfo folderInfo,
|
||||
/**
|
||||
* Constructs {@link AlfrescoImapFolder} object.
|
||||
*
|
||||
* @param folderInfo - reference to the {@link FileInfo} object representing the folder.
|
||||
* @param userName - name of user (e.g. "admin" for admin user).
|
||||
* @param folderName - name of the folder.
|
||||
* @param folderPath - path of the folder.
|
||||
* @param viewMode - defines view mode. Can be one of the following: {@link ImapViewMode#ARCHIVE} or {@link ImapViewMode#VIRTUAL}.
|
||||
* @param extractAttachmentsEnabled boolean
|
||||
* @param imapService ImapService
|
||||
* @param serviceRegistry ServiceRegistry
|
||||
* @param mountPointId - id of the mount point.
|
||||
*/
|
||||
public AlfrescoImapFolder(
|
||||
FileInfo folderInfo,
|
||||
String userName,
|
||||
String folderName,
|
||||
String folderPath,
|
||||
@@ -165,22 +165,22 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
this(folderInfo, userName, folderName, folderPath, viewMode, imapService, serviceRegistry, null, extractAttachmentsEnabled, mountPointId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs {@link AlfrescoImapFolder} object.
|
||||
*
|
||||
* @param folderInfo - reference to the {@link FileInfo} object representing the folder.
|
||||
* @param userName - name of the user (e.g. "admin" for admin user).
|
||||
* @param folderName - name of the folder.
|
||||
* @param folderPath - path of the folder.
|
||||
* @param viewMode - defines view mode. Can be one of the following: {@link ImapViewMode#ARCHIVE} or {@link ImapViewMode#VIRTUAL}.
|
||||
* @param imapService - the IMAP service.
|
||||
* @param serviceRegistry
|
||||
* @param selectable - defines whether the folder is selectable or not.
|
||||
* @param extractAttachmentsEnabled
|
||||
* @param mountPointId
|
||||
*/
|
||||
public AlfrescoImapFolder(
|
||||
FileInfo folderInfo,
|
||||
/**
|
||||
* Constructs {@link AlfrescoImapFolder} object.
|
||||
*
|
||||
* @param folderInfo - reference to the {@link FileInfo} object representing the folder.
|
||||
* @param userName - name of the user (e.g. "admin" for admin user).
|
||||
* @param folderName - name of the folder.
|
||||
* @param folderPath - path of the folder.
|
||||
* @param viewMode - defines view mode. Can be one of the following: {@link ImapViewMode#ARCHIVE} or {@link ImapViewMode#VIRTUAL}.
|
||||
* @param imapService - the IMAP service.
|
||||
* @param serviceRegistry ServiceRegistry
|
||||
* @param selectable - defines whether the folder is selectable or not.
|
||||
* @param extractAttachmentsEnabled boolean
|
||||
* @param mountPointId int
|
||||
*/
|
||||
public AlfrescoImapFolder(
|
||||
FileInfo folderInfo,
|
||||
String userName,
|
||||
String folderName,
|
||||
String folderPath,
|
||||
@@ -334,10 +334,10 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
* Moves the node <code>sourceNodeRef</code> extracted from the message id.
|
||||
* A part of a complex move operation.
|
||||
*
|
||||
* @param folderInfo
|
||||
* @param message
|
||||
* @param flags
|
||||
* @param sourceNodeRef
|
||||
* @param folderInfo FileInfo
|
||||
* @param message MimeMessage
|
||||
* @param flags Flags
|
||||
* @param sourceNodeRef NodeRef
|
||||
* @return UUID of the moved node
|
||||
* @throws FileExistsException
|
||||
* @throws FileNotFoundException
|
||||
@@ -378,7 +378,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
* <br>Typical message id is "<74bad8aa-75a5-4063-8e46-9d1b5737f43b@alfresco.org>"
|
||||
* <br>See {@link AbstractMimeMessage#updateMessageID()}
|
||||
*
|
||||
* @param message
|
||||
* @param message MimeMessage
|
||||
* @return null if nothing is found
|
||||
*/
|
||||
private NodeRef extractNodeRef(MimeMessage message)
|
||||
@@ -443,8 +443,8 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
/**
|
||||
* Determine if it is a complex move operation, which consists of a create superseded by a delete.
|
||||
*
|
||||
* @param sourceNodeRef
|
||||
* @return
|
||||
* @param sourceNodeRef NodeRef
|
||||
* @return boolean
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean isMoveOperation(NodeRef sourceNodeRef)
|
||||
@@ -505,7 +505,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all messages in the folder as deleted using {@link Flags.Flag#DELETED} flag.
|
||||
* Marks all messages in the folder as deleted using {@link javax.mail.Flags.Flag#DELETED} flag.
|
||||
*/
|
||||
@Override
|
||||
public void deleteAllMessagesInternal() throws FolderException
|
||||
@@ -524,7 +524,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes messages marked with {@link Flags.Flag#DELETED}. Note that this message deletes all messages with this flag.
|
||||
* Deletes messages marked with {@link javax.mail.Flags.Flag#DELETED}. Note that this message deletes all messages with this flag.
|
||||
*/
|
||||
@Override
|
||||
protected void expungeInternal() throws FolderException
|
||||
@@ -541,7 +541,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes messages marked with {@link Flags.Flag#DELETED}. Note that this message deletes the message with current uid
|
||||
* Deletes messages marked with {@link javax.mail.Flags.Flag#DELETED}. Note that this message deletes the message with current uid
|
||||
*/
|
||||
@Override
|
||||
protected void expungeInternal(long uid) throws Exception
|
||||
@@ -699,7 +699,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of messages that have no {@link Flags.Flag#DELETED} flag set for current user.
|
||||
* Returns the list of messages that have no {@link javax.mail.Flags.Flag#DELETED} flag set for current user.
|
||||
*
|
||||
* @return the list of non-deleted messages.
|
||||
*/
|
||||
@@ -740,11 +740,11 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns count of messages with {@link Flags.Flag#RECENT} flag.
|
||||
* If {@code reset} parameter is {@code true} - removes {@link Flags.Flag#RECENT} flag from
|
||||
* Returns count of messages with {@link javax.mail.Flags.Flag#RECENT} flag.
|
||||
* If {@code reset} parameter is {@code true} - removes {@link javax.mail.Flags.Flag#RECENT} flag from
|
||||
* the message for current user.
|
||||
*
|
||||
* @param reset - if true the {@link Flags.Flag#RECENT} will be deleted for current user if exists.
|
||||
* @param reset - if true the {@link javax.mail.Flags.Flag#RECENT} will be deleted for current user if exists.
|
||||
* @return returns count of recent messages.
|
||||
*/
|
||||
@Override
|
||||
@@ -807,7 +807,7 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns count of the messages with {@link Flags.Flag#SEEN} in the folder for the current user.
|
||||
* Returns count of the messages with {@link javax.mail.Flags.Flag#SEEN} in the folder for the current user.
|
||||
*
|
||||
* @return Count of the unseen messages for current user.
|
||||
*/
|
||||
|
@@ -53,7 +53,7 @@ public class AlfrescoImapHostManager implements ImapHostManager
|
||||
private static Log logger = LogFactory.getLog(AlfrescoImapHostManager.class);
|
||||
|
||||
/**
|
||||
* @param imapService
|
||||
* @param imapService ImapService
|
||||
*/
|
||||
public AlfrescoImapHostManager(ImapService imapService)
|
||||
{
|
||||
|
@@ -67,7 +67,6 @@ public class AlfrescoImapServer extends AbstractLifecycleBean implements Applica
|
||||
}
|
||||
|
||||
/**
|
||||
* @override
|
||||
* Use Java's default SSL Server SocketFactory
|
||||
* controlled via System Properties
|
||||
* -Djavax.net.ssl.keyStore=mySrvKeystore
|
||||
|
@@ -22,6 +22,9 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.icegreen.greenmail.imap.ImapRequestLineReader;
|
||||
import com.icegreen.greenmail.imap.ImapResponse;
|
||||
import com.icegreen.greenmail.imap.ImapSession;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -99,13 +102,12 @@ public class AlfrescoImapUserManager extends UserManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The login method.
|
||||
*
|
||||
* @see com.icegreen.greenmail.imap.commands.LoginCommand#doProcess(com.icegreen.greenmail.imap.ImapRequestLineReader, com.icegreen.greenmail.imap.ImapResponse, com.icegreen.greenmail.imap.ImapSession)
|
||||
*/
|
||||
public boolean test(String userid, String password)
|
||||
{
|
||||
/**
|
||||
* The login method.
|
||||
*
|
||||
*/
|
||||
public boolean test(String userid, String password)
|
||||
{
|
||||
try
|
||||
{
|
||||
authenticationService.authenticate(userid, password.toCharArray());
|
||||
|
@@ -101,7 +101,6 @@ public interface ImapService
|
||||
*
|
||||
* @param user User making the request.
|
||||
* @param mailboxName String name of the target,
|
||||
* @throws com.icegreen.greenmail.store.FolderException if mailbox has a non-selectable store with children
|
||||
*/
|
||||
public void deleteMailbox(AlfrescoImapUser user, String mailboxName);
|
||||
|
||||
@@ -189,14 +188,14 @@ public interface ImapService
|
||||
// public List<FileInfo> searchFolders(NodeRef contextNodeRef, String namePattern, boolean includeSubFolders, ImapViewMode viewMode);
|
||||
|
||||
/**
|
||||
* Search for emails in specified folder depend on view mode.
|
||||
*
|
||||
* @param contextNodeRef context folder for search
|
||||
* @param contextNodeRef context NodeRef
|
||||
* @param viewMode (ARCHIVE, MIXED or VIRTUAL)
|
||||
* @return list of emails that context folder contains.
|
||||
*/
|
||||
public FolderStatus getFolderStatus(final String userName, final NodeRef contextNodeRef, ImapViewMode viewMode);
|
||||
* Search for emails in specified folder depend on view mode.
|
||||
*
|
||||
* @param userName user name
|
||||
* @param contextNodeRef context NodeRef
|
||||
* @param viewMode (ARCHIVE, MIXED or VIRTUAL)
|
||||
* @return list of emails that context folder contains.
|
||||
*/
|
||||
public FolderStatus getFolderStatus(final String userName, final NodeRef contextNodeRef, ImapViewMode viewMode);
|
||||
|
||||
/**
|
||||
* Gets a cached MIME message for the given file, complete with message body.
|
||||
@@ -221,30 +220,30 @@ public interface ImapService
|
||||
*/
|
||||
public void expungeMessage(FileInfo messageFileInfo);
|
||||
|
||||
/**
|
||||
* Return flags that belong to the specified imap folder.
|
||||
*
|
||||
* @param messageFileInfo imap folder info.
|
||||
* @return flags.
|
||||
*/
|
||||
public Flags getFlags(FileInfo messageFileInfo);
|
||||
/**
|
||||
* Return flags that belong to the specified imap folder.
|
||||
*
|
||||
* @param messageFileInfo imap folder info.
|
||||
* @return flags.
|
||||
*/
|
||||
public Flags getFlags(FileInfo messageFileInfo);
|
||||
|
||||
/**
|
||||
* Set flags to the specified imapFolder.
|
||||
*
|
||||
* @param messageFileInfo FileInfo of imap Folder.
|
||||
* @param flags flags to set.
|
||||
* @param value value to set.
|
||||
*/
|
||||
/**
|
||||
* Set flags to the specified imapFolder.
|
||||
*
|
||||
* @param messageFileInfo FileInfo of imap Folder.
|
||||
* @param flags flags to set.
|
||||
* @param value value to set.
|
||||
*/
|
||||
public void setFlags(FileInfo messageFileInfo, Flags flags, boolean value);
|
||||
|
||||
/**
|
||||
* Set flag to the specified imapFolder.
|
||||
*
|
||||
* @param messageFileInfo FileInfo of imap Folder
|
||||
* @param flag flag to set.
|
||||
* @param value value value to set.
|
||||
*/
|
||||
/**
|
||||
* Set flag to the specified imapFolder.
|
||||
*
|
||||
* @param messageFileInfo FileInfo of imap Folder
|
||||
* @param flag flag to set.
|
||||
* @param value value value to set.
|
||||
*/
|
||||
public void setFlag(FileInfo messageFileInfo, Flag flag, boolean value);
|
||||
|
||||
/**
|
||||
@@ -276,13 +275,13 @@ public interface ImapService
|
||||
* Returns a template for email body. It is either classpath path or NodeRef.toString().
|
||||
* This method trying to find a template on the path in the repository first
|
||||
* e.g. {@code "Data Dictionary > IMAP Templates >"}. This path should be set as the property of the "imapHelper" bean.
|
||||
* In this case it returns {@code NodeRef.toString()} of the template. If there are no template in the repository it
|
||||
* returns a default template on the classpath.
|
||||
*
|
||||
* @param type one of the possible body types text/html and text/plain
|
||||
* @return
|
||||
*/
|
||||
public String getDefaultEmailBodyTemplate(EmailBodyFormat type);
|
||||
* In this case it returns {@code NodeRef.toString()} of the template. If there are no template in the repository it
|
||||
* returns a default template on the classpath.
|
||||
*
|
||||
* @param type one of the possible body types text/html and text/plain
|
||||
* @return String
|
||||
*/
|
||||
public String getDefaultEmailBodyTemplate(EmailBodyFormat type);
|
||||
|
||||
/**
|
||||
* Get the node's site container if it belongs to Sites.
|
||||
@@ -345,7 +344,7 @@ public interface ImapService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nodeRef
|
||||
* @param nodeRef NodeRef
|
||||
* @return path for node relatively to site root
|
||||
*/
|
||||
public String getPathFromSites(NodeRef nodeRef);
|
||||
|
@@ -570,7 +570,7 @@ public class ImapServiceImpl implements ImapService, OnRestoreNodePolicy, OnCrea
|
||||
|
||||
/**
|
||||
* Workaround for MNT-12259
|
||||
* @param nodeRef
|
||||
* @param nodeRef NodeRef
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void hideAndDelete(final NodeRef nodeRef)
|
||||
@@ -1183,7 +1183,7 @@ public class ImapServiceImpl implements ImapService, OnRestoreNodePolicy, OnCrea
|
||||
/**
|
||||
* Recursively search the given root to get a list of folders
|
||||
*
|
||||
* @return
|
||||
* @return List<AlfrescoImapFolder>
|
||||
*/
|
||||
private List<AlfrescoImapFolder> expandFolder(
|
||||
NodeRef root,
|
||||
@@ -1477,7 +1477,7 @@ public class ImapServiceImpl implements ImapService, OnRestoreNodePolicy, OnCrea
|
||||
|
||||
/**
|
||||
* Checks for the existence of the flaggable aspect and adds it if it is not already present on the folder.
|
||||
* @param nodeRef
|
||||
* @param nodeRef NodeRef
|
||||
*/
|
||||
private void checkForFlaggableAspect(NodeRef nodeRef)
|
||||
{
|
||||
|
Reference in New Issue
Block a user