mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
11008: FileFolderService no longer uses Lucene 11014: Fixed ETWOTWO-569: Regression after ContentStoreCleaner overhaul 11021: Fixed HibernateSessionHelperTest 11028: Fixed unit test's expected values 11035: Made cm:auditable optional and fixed 64K limit on property list sizes 11038: IncompleteNodeTagger handles aspects that are not in the dictionary 11039: Added tests to ensure that QName caching is case-insensitive 11040: Fixed use of mixed-case QNames for aspects 11044: Allow background AND in-transaction indexing to be disabled at the same time. 11046: Removed Lucene use from RegistryServiceImpl 11050: Removal of Lucene usage - ML services finding root using XPath moved to path query - RepoStore now uses simple path query - Remove unused imports on PersonServiceImpl git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,7 +40,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceException;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
@@ -131,15 +131,22 @@ public class RegistryServiceImpl implements RegistryService
|
||||
{
|
||||
NodeRef registryRootNodeRef = null;
|
||||
// Ensure that the registry root node is present
|
||||
ResultSet rs = searchService.query(registryStoreRef, SearchService.LANGUAGE_LUCENE, "PATH:\"" + registryRootPath + "\"");
|
||||
if (rs.length() == 0)
|
||||
NodeRef storeRootNodeRef = nodeService.getRootNode(registryStoreRef);
|
||||
List<NodeRef> nodeRefs = searchService.selectNodes(
|
||||
storeRootNodeRef,
|
||||
registryRootPath,
|
||||
new QueryParameterDefinition[] {},
|
||||
namespaceService,
|
||||
false,
|
||||
SearchService.LANGUAGE_XPATH);
|
||||
if (nodeRefs.size() == 0)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(
|
||||
"Registry root not present: \n" +
|
||||
" Store: " + registryStoreRef + "\n" +
|
||||
" Path: " + registryRootPath);
|
||||
}
|
||||
else if (rs.length() > 1)
|
||||
else if (nodeRefs.size() > 1)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(
|
||||
"Registry root path has multiple targets: \n" +
|
||||
@@ -148,8 +155,9 @@ public class RegistryServiceImpl implements RegistryService
|
||||
}
|
||||
else
|
||||
{
|
||||
registryRootNodeRef = rs.getNodeRef(0);
|
||||
registryRootNodeRef = nodeRefs.get(0);
|
||||
}
|
||||
|
||||
// Check the root
|
||||
QName typeQName = nodeService.getType(registryRootNodeRef);
|
||||
if (!typeQName.equals(ContentModel.TYPE_CONTAINER))
|
||||
|
Reference in New Issue
Block a user