mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Importer - allow imported node references/paths to be searched for within committed repository only or committed repository and current import transaction.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2202 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -197,6 +197,11 @@ public class ExportSourceImporter implements ImporterJobSPI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean allowReferenceWithinTransaction()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -439,6 +439,15 @@ public class ImporterBootstrap
|
|||||||
// always use create new strategy for bootstrap import
|
// always use create new strategy for bootstrap import
|
||||||
return UUID_BINDING.CREATE_NEW;
|
return UUID_BINDING.CREATE_NEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.alfresco.service.cmr.view.ImporterBinding#searchWithinTransaction()
|
||||||
|
*/
|
||||||
|
public boolean allowReferenceWithinTransaction()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -632,7 +632,7 @@ public class ImporterComponent
|
|||||||
searchParameters.addStore(importedRef.context.getNodeRef().getStoreRef());
|
searchParameters.addStore(importedRef.context.getNodeRef().getStoreRef());
|
||||||
searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);
|
searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
searchParameters.setQuery("PATH:\"" + importedRef.value + "\"");
|
searchParameters.setQuery("PATH:\"" + importedRef.value + "\"");
|
||||||
searchParameters.excludeDataInTheCurrentTransaction(false);
|
searchParameters.excludeDataInTheCurrentTransaction((binding == null) ? true : !binding.allowReferenceWithinTransaction());
|
||||||
ResultSet resultSet = searchService.query(searchParameters);
|
ResultSet resultSet = searchService.query(searchParameters);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -41,7 +41,15 @@ public interface ImporterBinding
|
|||||||
public UUID_BINDING getUUIDBinding();
|
public UUID_BINDING getUUIDBinding();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a value for the specified name - to support simple name / value binding
|
* Gets whether the search for imported node references should search within the import
|
||||||
|
* transaction or not.
|
||||||
|
*
|
||||||
|
* @return true => search within import transaction; false => only search existing committed items
|
||||||
|
*/
|
||||||
|
public boolean allowReferenceWithinTransaction();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a value for the specified name - to support simple name / value substitution
|
||||||
*
|
*
|
||||||
* @param key the value name
|
* @param key the value name
|
||||||
* @return the value
|
* @return the value
|
||||||
|
Reference in New Issue
Block a user