mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV/JASONH to HEAD
12201: MT-enable (implementing ALFCOM-1892), also add ALFCOM-1809 workaround 12242: Refactor creating getRootNode method 12662: improve ALFCOM-1892, also remove ALFCOM-1809 workaround (should not be required) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12664 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -52,6 +52,13 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
|
||||
|
||||
/**
|
||||
* Base servlet class containing useful constant values and common methods for Alfresco servlets.
|
||||
*
|
||||
@@ -89,6 +96,8 @@ public abstract class BaseServlet extends HttpServlet
|
||||
|
||||
private static Log logger = LogFactory.getLog(BaseServlet.class);
|
||||
|
||||
// Tenant service
|
||||
private static TenantService m_tenantService;
|
||||
|
||||
/**
|
||||
* Return the ServiceRegistry helper instance
|
||||
@@ -291,6 +300,26 @@ public abstract class BaseServlet extends HttpServlet
|
||||
// get the company home node to start the search from
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
|
||||
m_tenantService = (TenantService) wc.getBean("tenantService");
|
||||
if (m_tenantService !=null && m_tenantService.isEnabled())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("MT is enabled.");
|
||||
}
|
||||
|
||||
NodeService nodeService = (NodeService) wc.getBean("NodeService");
|
||||
SearchService searchService = (SearchService) wc.getBean("SearchService");
|
||||
NamespaceService namespaceService = (NamespaceService) wc.getBean("NamespaceService");
|
||||
|
||||
// TODO: since these constants are used more widely than just the WebDAVServlet,
|
||||
// they should be defined somewhere other than in that servlet
|
||||
String m_rootPath = wc.getServletContext().getInitParameter(org.alfresco.repo.webdav.WebDAVServlet.KEY_ROOT_PATH);
|
||||
|
||||
// note: rootNodeRef is required (for storeRef part)
|
||||
nodeRef = m_tenantService.getRootNode(nodeService, searchService, namespaceService, m_rootPath, nodeRef);
|
||||
}
|
||||
|
||||
if (paths.size() != 0)
|
||||
{
|
||||
FileFolderService ffs = (FileFolderService)wc.getBean("FileFolderService");
|
||||
|
Reference in New Issue
Block a user