mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Merged HEAD (5.1) to 5.1.N (5.1.1)
114730 sglover: ACE-4436 "[Upgrade]Wrong username displayed for the site's creator name after upgrade" git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@114854 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
		| @@ -1081,6 +1081,9 @@ | ||||
|       <property name="siteService"> | ||||
|          <ref bean="siteService" /> | ||||
|       </property> | ||||
|       <property name="behaviourFilter" > | ||||
|          <ref bean="policyBehaviourFilter"/> | ||||
|       </property> | ||||
|    </bean> | ||||
|  | ||||
|    <bean id="patch.deleteClassifibleAspectForFailedThumbnail" class="org.alfresco.repo.admin.patch.impl.GenericDeleteAspectForTypePatch" | ||||
|   | ||||
| @@ -18,12 +18,17 @@ | ||||
|  */ | ||||
| package org.alfresco.repo.admin.patch.impl; | ||||
|  | ||||
| import java.util.*; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Collection; | ||||
| import java.util.Collections; | ||||
| import java.util.Iterator; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.alfresco.model.ContentModel; | ||||
| import org.alfresco.repo.admin.patch.AbstractPatch; | ||||
| import org.alfresco.repo.batch.BatchProcessWorkProvider; | ||||
| import org.alfresco.repo.batch.BatchProcessor; | ||||
| import org.alfresco.repo.policy.BehaviourFilter; | ||||
| import org.alfresco.repo.site.SiteModel; | ||||
| import org.alfresco.repo.transaction.RetryingTransactionHelper; | ||||
| import org.alfresco.service.cmr.repository.ChildAssociationRef; | ||||
| @@ -49,12 +54,18 @@ public class AddUnmovableAspectToSitesPatch extends AbstractPatch | ||||
|     private final int BATCH_SIZE = 200; | ||||
|  | ||||
|     private SiteService siteService;  | ||||
|     private BehaviourFilter behaviourFilter; | ||||
|  | ||||
|     public void setSiteService(SiteService siteService) | ||||
|     { | ||||
|         this.siteService = siteService; | ||||
|     } | ||||
|  | ||||
|     public void setBehaviourFilter(BehaviourFilter behaviourFilter) | ||||
|     { | ||||
|         this.behaviourFilter = behaviourFilter; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     protected String applyInternal() throws Exception | ||||
|     { | ||||
| @@ -112,7 +123,15 @@ public class AddUnmovableAspectToSitesPatch extends AbstractPatch | ||||
|  | ||||
|             public void process(ChildAssociationRef child) throws Throwable | ||||
|             { | ||||
|                 nodeService.addAspect(child.getChildRef(), ContentModel.ASPECT_UNMOVABLE, null); | ||||
|                 try | ||||
|                 { | ||||
|                     behaviourFilter.disableBehaviour(ContentModel.ASPECT_AUDITABLE); | ||||
|                     nodeService.addAspect(child.getChildRef(), ContentModel.ASPECT_UNMOVABLE, null); | ||||
|                 } | ||||
|                 finally | ||||
|                 { | ||||
|                     behaviourFilter.enableBehaviour(ContentModel.ASPECT_AUDITABLE); | ||||
|                 } | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user