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

95986: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      94456: Merged DEV (5.0.1) to 5.0.N (5.0.1)
         94352: MNT-12995: Items are not accessible using the urls received via IMAP
         Changed the URLs in IMAP templates to point to Share instead of Explorer(EOL).


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@96015 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-02-04 07:42:57 +00:00
parent b76731eade
commit 7d2b335d5d
35 changed files with 246 additions and 142 deletions

View File

@@ -82,7 +82,7 @@ public abstract class AbstractMimeMessage extends MimeMessage
this.serviceRegistry = serviceRegistry;
this.imapService = serviceRegistry.getImapService();
this.messageFileInfo = fileInfo;
this.isMessageInSitesLibrary = imapService.isNodeInSitesLibrary(messageFileInfo.getNodeRef());
this.isMessageInSitesLibrary = imapService.getNodeSiteContainer(messageFileInfo.getNodeRef()) != null ? true : false;
RetryingTransactionHelper txHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper();
txHelper.setMaxRetries(MAX_RETRIES);
txHelper.setReadOnly(false);
@@ -216,28 +216,9 @@ public abstract class AbstractMimeMessage extends MimeMessage
model.put("date", new Date());
model.put("contextUrl", new String(imapService.getWebApplicationContextUrl()));
model.put("alfTicket", new String(serviceRegistry.getAuthenticationService().getCurrentTicket()));
if (isMessageInSitesLibrary)
{
String pathFromSites = imapService.getPathFromSites(parent);
StringBuilder parsedPath = new StringBuilder();
String[] pathParts = pathFromSites.split("/");
if (pathParts.length > 2)
{
parsedPath.append(pathParts[0]).append("/").append(pathParts[1]);
parsedPath.append("?filter=path|");
for (int i = 2; i < pathParts.length; i++)
{
parsedPath.append("/").append(pathParts[i]);
}
}
else
{
parsedPath.append(pathFromSites);
}
model.put("shareContextUrl", new String(imapService.getShareApplicationContextUrl()));
model.put("parentPathFromSites", parsedPath.toString());
}
String contentFolderUrl = imapService.getContentFolderUrl(ref);
model.put("shareContextUrl", new String(imapService.getShareApplicationContextUrl()));
model.put("contentFolderUrl", contentFolderUrl);
return model;
}