private List createContents(Content content, Map<Integer,List<ExportContentVersionImpl>> allContentVersionMap, Map idMap, Map contentTypeDefinitionIdMap, List allContents, Map<Integer,Language> languages, Collection contentTypeDefinitions, Map categoryIdMap, List<SmallDigitalAssetImpl> allSmallAssets, Map<Integer,List<Integer>> assetVersionsMap, Database db, String onlyLatestVersions, boolean isCopyAction, Map<String,String> replaceMap) throws Exception
{
Map<Integer,Boolean> handledSmallAssets = new HashMap<Integer,Boolean>();
//logger.info("createContents:" + content + ":" + allContentVersionMap.size());
ContentTypeDefinition contentTypeDefinition = null;
Integer originalContentId = content.getContentId();
Integer contentTypeDefinitionId = ((ContentImpl)content).getContentTypeDefinitionId();
if(contentTypeDefinitionId != null)
{
if(!isCopyAction)
{
if(contentTypeDefinitionIdMap.containsKey(contentTypeDefinitionId))
contentTypeDefinitionId = (Integer)contentTypeDefinitionIdMap.get(contentTypeDefinitionId);
ContentTypeDefinition originalContentTypeDefinition = null;
Iterator contentTypeDefinitionsIterator = contentTypeDefinitions.iterator();
while(contentTypeDefinitionsIterator.hasNext())
{
ContentTypeDefinition contentTypeDefinitionCandidate = (ContentTypeDefinition)contentTypeDefinitionsIterator.next();
if(contentTypeDefinitionCandidate.getId().intValue() == contentTypeDefinitionId.intValue())
{
originalContentTypeDefinition = contentTypeDefinitionCandidate;
break;
}
}