mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fall back to selectNodes if a path contains a predicate.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4809 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1004,19 +1004,31 @@ public class ImporterComponent
|
||||
searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
searchParameters.setQuery("PATH:\"" + importedRef + "\"");
|
||||
searchParameters.excludeDataInTheCurrentTransaction((binding == null) ? true : !binding.allowReferenceWithinTransaction());
|
||||
ResultSet resultSet = searchService.query(searchParameters);
|
||||
ResultSet resultSet = null;
|
||||
try
|
||||
{
|
||||
resultSet = searchService.query(searchParameters);
|
||||
if (resultSet.length() > 0)
|
||||
{
|
||||
nodeRef = resultSet.getNodeRef(0);
|
||||
}
|
||||
}
|
||||
catch(UnsupportedOperationException e)
|
||||
{
|
||||
List<NodeRef> nodeRefs = searchService.selectNodes(sourceNodeRef, importedRef, null, namespaceService, false);
|
||||
if (nodeRefs.size() > 0)
|
||||
{
|
||||
nodeRef = nodeRefs.get(0);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (resultSet != null)
|
||||
{
|
||||
resultSet.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// determine if node reference
|
||||
|
Reference in New Issue
Block a user