Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:

43124: Merged BRANCHES/DEV/FEATURES/CLOUD1_DISCUSSIONS to BRANCHES/DEV/V4.1-BUG-FIX:
        43059: CLOUD-864: Use base node ref, instead of tenant specific node ref for building list of replies (ALF-16498)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43125 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2012-10-26 09:30:15 +00:00
parent b794365eaa
commit de47da1766
4 changed files with 233 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -48,11 +48,11 @@ import org.alfresco.repo.query.NodeWithTargetsEntity;
import org.alfresco.repo.query.NodeWithTargetsEntity.TargetAndTypeId;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.site.SiteServiceImpl;
import org.alfresco.repo.tenant.TenantService;
import org.alfresco.service.cmr.discussion.DiscussionService;
import org.alfresco.service.cmr.discussion.PostInfo;
import org.alfresco.service.cmr.discussion.PostWithReplies;
import org.alfresco.service.cmr.discussion.TopicInfo;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
@@ -100,9 +100,9 @@ public class DiscussionServiceImpl implements DiscussionService
private ContentService contentService;
private TaggingService taggingService;
private NamespaceService namespaceService;
private FileFolderService fileFolderService;
private TransactionService transactionService;
private NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry;
private TenantService tenantService;
public void setNodeDAO(NodeDAO nodeDAO)
{
@@ -139,11 +139,6 @@ public class DiscussionServiceImpl implements DiscussionService
this.namespaceService = namespaceService;
}
public void setFileFolderService(FileFolderService fileFolderService)
{
this.fileFolderService = fileFolderService;
}
public void setTransactionService(TransactionService transactionService)
{
this.transactionService = transactionService;
@@ -157,6 +152,14 @@ public class DiscussionServiceImpl implements DiscussionService
this.cannedQueryRegistry = cannedQueryRegistry;
}
/**
* Set the {@link TenantService}
*/
public void setTenantService(TenantService tenantService)
{
this.tenantService = tenantService;
}
/**
* Fetches the Discussions Container on a site, creating as required if requested.
*/
@@ -832,6 +835,7 @@ public class DiscussionServiceImpl implements DiscussionService
// References a node outside of this topic
continue;
}
nodeRef = tenantService.getBaseName(nodeRef);
if (id.equals(e.getId()))
{
// Self reference