mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Resolve ALF-5042: Default root folder path '/Company Home' not found
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22837 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -140,6 +140,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
private RetryingTransactionHelper retryingTransactionHelper;
|
||||
private DictionaryService dictionaryService;
|
||||
private CMISDictionaryService cmisDictionaryService;
|
||||
private NamespaceService namespaceService;
|
||||
private SearchService searchService;
|
||||
private NodeService nodeService;
|
||||
private FileFolderService fileFolderService;
|
||||
@@ -221,6 +222,14 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
this.retryingTransactionHelper = retryingTransactionHelper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param namespaceService
|
||||
*/
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dictionaryService
|
||||
*/
|
||||
@@ -454,8 +463,13 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
{
|
||||
public NodeRef execute() throws Exception
|
||||
{
|
||||
String path = defaultStoreRef.getProtocol() + "/" + defaultStoreRef.getIdentifier() + defaultRootPath;
|
||||
return repository.findNodeRef("path", path.split("/"));
|
||||
NodeRef root = nodeService.getRootNode(defaultStoreRef);
|
||||
List<NodeRef> rootNodes = searchService.selectNodes(root, defaultRootPath, null, namespaceService, false);
|
||||
if (rootNodes.size() != 1)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to locate CMIS root path " + defaultRootPath);
|
||||
}
|
||||
return rootNodes.get(0);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user