mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/V3.2 to HEAD:
18363: WCM clustering - ETHREEOH-3962 (duplicate root node entry) 19091: Fix Part 1 ALF-726: v3.1.x Content Cleaner Job needs to be ported to v3.2 19159: Fixed ALF-726: Migrate pre-3.2 content URLs to new format and pick up tag existing orphaned content 19169: Fix fallout from 19159 for ALF-726: Migrate pre-3.2 content URLs to new format and pick up tag existing orphaned content 19262: ALF-726 Multithreading for content URL conversion git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19267 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,7 +22,6 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -33,6 +32,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.descriptor.DescriptorServiceImpl.BaseDescriptor;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
@@ -201,17 +201,18 @@ public class RepositoryDescriptorDAOImpl implements DescriptorDAO
|
||||
props.put(ContentModel.PROP_SYS_VERSION_SCHEMA, serverDescriptor.getSchema());
|
||||
this.nodeService.addProperties(currentDescriptorNodeRef, props);
|
||||
|
||||
// The version edition property may already have been overwritten with a license, so only set the property
|
||||
// if it doesn't already contain ContentData
|
||||
final Serializable value = this.nodeService.getProperty(currentDescriptorNodeRef,
|
||||
// ALF-726: v3.1.x Content Cleaner Job needs to be ported to v3.2
|
||||
// In order to migrate properly, this property needs to be d:content. We will rewrite the property with the
|
||||
// license update code. There is no point attempting to rewrite the property here.
|
||||
final Serializable value = this.nodeService.getProperty(
|
||||
currentDescriptorNodeRef,
|
||||
ContentModel.PROP_SYS_VERSION_EDITION);
|
||||
if (!(value instanceof Collection) || ((Collection<?>) value).isEmpty()
|
||||
|| ((Collection<?>) value).iterator().next() instanceof String)
|
||||
if (value == null)
|
||||
{
|
||||
final Collection<String> editions = new ArrayList<String>();
|
||||
editions.add(serverDescriptor.getEdition());
|
||||
this.nodeService.setProperty(currentDescriptorNodeRef, ContentModel.PROP_SYS_VERSION_EDITION,
|
||||
(Serializable) editions);
|
||||
this.nodeService.setProperty(
|
||||
currentDescriptorNodeRef,
|
||||
ContentModel.PROP_SYS_VERSION_EDITION,
|
||||
new ContentData(null, null, 0L, null));
|
||||
}
|
||||
|
||||
// done
|
||||
|
Reference in New Issue
Block a user