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:
@@ -50,9 +50,6 @@ import org.alfresco.service.cmr.repository.ContentData;
|
||||
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.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -84,12 +81,12 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public class MultilingualContentServiceImpl implements MultilingualContentService
|
||||
{
|
||||
private static final QName QNAME_ASSOC_ML_ROOT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "multilingualRoot");
|
||||
|
||||
private static Log logger = LogFactory.getLog(MultilingualContentServiceImpl.class);
|
||||
|
||||
private NodeService nodeService;
|
||||
private SearchService searchService;
|
||||
private PermissionService permissionService;
|
||||
private SearchParameters searchParametersMLRoot;
|
||||
private ContentFilterLanguagesService contentFilterLanguagesService;
|
||||
private FileFolderService fileFolderService;
|
||||
|
||||
@@ -97,11 +94,6 @@ public class MultilingualContentServiceImpl implements MultilingualContentServic
|
||||
|
||||
public MultilingualContentServiceImpl()
|
||||
{
|
||||
searchParametersMLRoot = new SearchParameters();
|
||||
searchParametersMLRoot.setLanguage(SearchService.LANGUAGE_XPATH);
|
||||
searchParametersMLRoot.setLimit(1);
|
||||
searchParametersMLRoot.addStore(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"));
|
||||
searchParametersMLRoot.setQuery("/cm:multilingualRoot");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,25 +101,19 @@ public class MultilingualContentServiceImpl implements MultilingualContentServic
|
||||
*/
|
||||
private NodeRef getMLContainerRoot()
|
||||
{
|
||||
ResultSet rs = searchService.query(searchParametersMLRoot);
|
||||
try
|
||||
NodeRef rootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
List<ChildAssociationRef> assocRefs = nodeService.getChildAssocs(
|
||||
rootNodeRef,
|
||||
ContentModel.ASSOC_CHILDREN,
|
||||
QNAME_ASSOC_ML_ROOT);
|
||||
if (assocRefs.size() != 1)
|
||||
{
|
||||
if (rs.length() > 0)
|
||||
{
|
||||
NodeRef mlRootNodeRef = rs.getNodeRef(0);
|
||||
// done
|
||||
return mlRootNodeRef;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(
|
||||
"Unable to find bootstrap location for ML Root using query: " + searchParametersMLRoot.getQuery());
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
rs.close();
|
||||
throw new AlfrescoRuntimeException(
|
||||
"Unable to find bootstrap location for ML Root using query: " + QNAME_ASSOC_ML_ROOT);
|
||||
}
|
||||
NodeRef mlRootNodeRef = assocRefs.get(0).getChildRef();
|
||||
// Done
|
||||
return mlRootNodeRef;
|
||||
}
|
||||
|
||||
private static final QName QNAME_ML_CONTAINER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "mlContainer");
|
||||
@@ -962,11 +948,6 @@ public class MultilingualContentServiceImpl implements MultilingualContentServic
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
public void setPermissionService(PermissionService permissionService)
|
||||
{
|
||||
this.permissionService = permissionService;
|
||||
|
Reference in New Issue
Block a user