mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX to HEAD (4.2)
54937: MNT-9570: Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2) 54848: Merged DEV to V4.1-BUG-FIX (4.1.7) MNT-9538 : Upgrade changes cm:modified data for nodes in a workflow - Disabling/enabling auditable behavior around the FixBpmPackagesPatch patch git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55015 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3044,6 +3044,9 @@
|
|||||||
<property name="importerBootstrap">
|
<property name="importerBootstrap">
|
||||||
<ref bean="spacesBootstrap" />
|
<ref bean="spacesBootstrap" />
|
||||||
</property>
|
</property>
|
||||||
|
<property name="policyFilter">
|
||||||
|
<ref bean="policyBehaviourFilter" />
|
||||||
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="patch.db-V3.4-Upgrade-JBPM" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
<bean id="patch.db-V3.4-Upgrade-JBPM" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||||
|
@@ -31,6 +31,7 @@ import org.alfresco.repo.admin.patch.PatchExecuter;
|
|||||||
import org.alfresco.repo.batch.BatchProcessWorkProvider;
|
import org.alfresco.repo.batch.BatchProcessWorkProvider;
|
||||||
import org.alfresco.repo.batch.BatchProcessor;
|
import org.alfresco.repo.batch.BatchProcessor;
|
||||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||||
|
import org.alfresco.repo.policy.BehaviourFilter;
|
||||||
import org.alfresco.repo.workflow.WorkflowModel;
|
import org.alfresco.repo.workflow.WorkflowModel;
|
||||||
import org.alfresco.service.cmr.admin.PatchException;
|
import org.alfresco.service.cmr.admin.PatchException;
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
@@ -67,6 +68,8 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
|||||||
|
|
||||||
private ImporterBootstrap importerBootstrap;
|
private ImporterBootstrap importerBootstrap;
|
||||||
|
|
||||||
|
private BehaviourFilter policyFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param batchThreads the number of threads that will write child association changes
|
* @param batchThreads the number of threads that will write child association changes
|
||||||
*/
|
*/
|
||||||
@@ -88,13 +91,20 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
|||||||
this.importerBootstrap = importerBootstrap;
|
this.importerBootstrap = importerBootstrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void setPolicyFilter(BehaviourFilter policyFilter) {
|
||||||
|
this.policyFilter = policyFilter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected String applyInternal() throws Exception
|
protected String applyInternal() throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
FixBpmPackagesPatchHelper helper = new FixBpmPackagesPatchHelper();
|
FixBpmPackagesPatchHelper helper = new FixBpmPackagesPatchHelper();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// disable auditable behavior. MNT-9538 fix
|
||||||
|
policyFilter.disableBehaviour(ContentModel.ASPECT_AUDITABLE);
|
||||||
|
|
||||||
StoreRef store = importerBootstrap.getStoreRef();
|
StoreRef store = importerBootstrap.getStoreRef();
|
||||||
if (store == null)
|
if (store == null)
|
||||||
{
|
{
|
||||||
@@ -151,6 +161,9 @@ public class FixBpmPackagesPatch extends AbstractPatch
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
// enable auditable behavior. MNT-9538 fix
|
||||||
|
policyFilter.enableBehaviour(ContentModel.ASPECT_AUDITABLE);
|
||||||
|
|
||||||
helper.closeWriter();
|
helper.closeWriter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user