Fix issue where imported content does not have associated binary content stream (i.e. fixes "ContentData does not have a content url" error).

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2232 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana 2006-01-27 16:46:07 +00:00
parent c81c8f59e8
commit c131dd7dec

View File

@ -590,8 +590,9 @@ public class ImporterComponent
// bind import content data description
DataTypeDefinition dataTypeDef = dictionaryService.getDataType(DataTypeDefinition.CONTENT);
importContentData = bindPlaceHolder(importContentData, binding);
if (importContentData != null && importContentData.length() > 0)
{
ContentData contentData = (ContentData)DefaultTypeConverter.INSTANCE.convert(dataTypeDef, importContentData);
String contentUrl = contentData.getContentUrl();
if (contentUrl != null && contentUrl.length() > 0)
{
@ -604,6 +605,7 @@ public class ImporterComponent
reportContentCreated(nodeRef, contentUrl);
}
}
}
/* (non-Javadoc)
* @see org.alfresco.repo.importer.Importer#childrenImported(org.alfresco.service.cmr.repository.NodeRef)